]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/spawn.qc
Add an infection mode to zombie apocalypse, which allows playing as monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / spawn.qc
index 2ef2c2e0897fe4d6164c54ca5268a21c03e1a554..4f2cbc5990f4b2787df094f6439871007c5ddb62 100644 (file)
@@ -84,11 +84,13 @@ float M_Spawn_Attack(float attack_type)
 }
 
 void spawnfunc_monster_spawn() { Monster_Spawn(MON_SPAWN); }
+#endif // SVQC
 
-float M_Spawn(float req)
+bool M_Spawn(int req)
 {
        switch(req)
        {
+               #ifdef SVQC
                case MR_THINK:
                {
                        // prevent standard code from breaking everything
@@ -109,6 +111,7 @@ float M_Spawn(float req)
                        defer(0.05, M_Spawn_Attack_Explode); // simply defer to prevent recursion
                        return true;
                }
+               #endif
                case MR_ANIM:
                {
                        vector none = '0 0 0';
@@ -120,6 +123,7 @@ float M_Spawn(float req)
 
                        return true;
                }
+               #ifdef SVQC
                case MR_SETUP:
                {
                        if(!self.health) self.health = (autocvar_g_monster_spawn_health);
@@ -137,10 +141,10 @@ float M_Spawn(float req)
                {
                        return true;
                }
+               #endif
        }
 
        return true;
 }
 
-#endif // SVQC
 #endif // REGISTER_MONSTER