]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_domination.qh
gamemodes: prevent addition and removal at runtime with a single macro
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_domination.qh
index 19ba2f9a3f34249632d87f3fac62c46000ab3ef8..8b4ca399bae9de5a5e0c200d4d934448f9db0b7d 100644 (file)
@@ -11,10 +11,9 @@ void dom_Initialize();
 
 REGISTER_MUTATOR(dom, false)
 {
+    MUTATOR_STATIC();
        MUTATOR_ONADD
        {
-               if (time > 1) // game loads at time 1
-                       error("This is a game type and it cannot be added at runtime.");
                dom_Initialize();
 
                int fraglimit_override = autocvar_g_domination_point_limit;
@@ -25,13 +24,6 @@ REGISTER_MUTATOR(dom, false)
         GameRules_limit_score(fraglimit_override);
         GameRules_limit_lead(autocvar_g_domination_point_leadlimit);
        }
-
-       MUTATOR_ONREMOVE
-       {
-               LOG_INFO("This is a game type and it cannot be removed at runtime.");
-               return -1;
-       }
-
        return 0;
 }