]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/nexball/sv_nexball.qh
Clean up nexball gametype definition
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / nexball / sv_nexball.qh
index 864e89138aef001775eb6434db52b55ac8a2f73d..902de157f89cbd60d58a056aad3c03653bcdd783 100644 (file)
@@ -1,5 +1,25 @@
 #pragma once
 
+#include "weapon.qh"
+
+void nb_Initialize();
+
+REGISTER_MUTATOR(nb, false)
+{
+    MUTATOR_STATIC();
+       MUTATOR_ONADD
+       {
+               nb_Initialize();
+               WEP_NEXBALL.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
+       }
+
+       MUTATOR_ONROLLBACK_OR_REMOVE
+       {
+               WEP_NEXBALL.spawnflags |= WEP_FLAG_MUTATORBLOCKED;
+       }
+       return 0;
+}
+
 //EF_BRIGHTFIELD|EF_BRIGHTLIGHT|EF_DIMLIGHT|EF_BLUE|EF_RED|EF_FLAME
 const float BALL_EFFECTMASK = 1229;
 const vector BALL_MINS = '-16 -16 -16'; // The model is 24*24*24