]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_deathmatch.qc
Merge branch 'master' into terencehill/hud_fixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_deathmatch.qc
index ac7ea21b2653ebf595c9aba21e8801baf06eb4c1..866370351377f1dda2c9ac12fa447b8a3ed8f4db 100644 (file)
@@ -1,15 +1,12 @@
-#ifdef IMPLEMENTATION
-MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining)
-{
-       // announce remaining frags
-       return true;
-}
+#include "gamemode_deathmatch.qh"
+#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.");
        }
 
@@ -22,10 +19,19 @@ REGISTER_MUTATOR(dm, IS_GAMETYPE(DEATHMATCH))
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               error("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
        return 0;
 }
+
+#endif
+
+#ifdef IMPLEMENTATION
+MUTATOR_HOOKFUNCTION(dm, Scores_CountFragsRemaining)
+{
+       // announce remaining frags
+       return true;
+}
 #endif