]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_deathmatch.qc
Gametypes: invert control
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_deathmatch.qc
index ac7ea21b2653ebf595c9aba21e8801baf06eb4c1..5ebd7c6b6e65b477ac711cb21fb1c54dc93adca5 100644 (file)
@@ -1,15 +1,11 @@
-#ifdef IMPLEMENTATION
-MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining)
-{
-       // announce remaining frags
-       return true;
-}
+#ifndef GAMEMODE_DEATHMATCH_H
+#define GAMEMODE_DEATHMATCH_H
 
-REGISTER_MUTATOR(dm, IS_GAMETYPE(DEATHMATCH))
+REGISTER_MUTATOR(dm, false)
 {
        MUTATOR_ONADD
        {
-               if(time > 1) // game loads at time 1
+               if (time > 1) // game loads at time 1
                        error("This is a game type and it cannot be added at runtime.");
        }
 
@@ -28,4 +24,13 @@ REGISTER_MUTATOR(dm, IS_GAMETYPE(DEATHMATCH))
 
        return 0;
 }
+
+#endif
+
+#ifdef IMPLEMENTATION
+MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining)
+{
+       // announce remaining frags
+       return true;
+}
 #endif