]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_deathmatch.qc
Spawner: Spawn nothing if it's set to an invalid monster
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_deathmatch.qc
index ac7ea21b2653ebf595c9aba21e8801baf06eb4c1..9590027d3f6b6454e8ba2837985ff30663957a07 100644 (file)
@@ -1,31 +1,7 @@
-#ifdef IMPLEMENTATION
+#include "gamemode_deathmatch.qh"
+
 MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining)
 {
        // announce remaining frags
        return true;
 }
-
-REGISTER_MUTATOR(dm, IS_GAMETYPE(DEATHMATCH))
-{
-       MUTATOR_ONADD
-       {
-               if(time > 1) // game loads at time 1
-                       error("This is a game type and it cannot be added at runtime.");
-       }
-
-       MUTATOR_ONROLLBACK_OR_REMOVE
-       {
-               // we actually cannot roll back dm_Initialize here
-               // BUT: we don't need to! If this gets called, adding always
-               // succeeds.
-       }
-
-       MUTATOR_ONREMOVE
-       {
-               print("This is a game type and it cannot be removed at runtime.");
-               return -1;
-       }
-
-       return 0;
-}
-#endif