]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove turrets that weren't spawned by a player
authorMario <mario.mario@y7mail.com>
Sat, 26 Jan 2013 09:57:08 +0000 (20:57 +1100)
committerMario <mario.mario@y7mail.com>
Sat, 26 Jan 2013 09:57:08 +0000 (20:57 +1100)
qcsrc/server/mutators/gamemode_td.qc

index a1b4550f794600ebfde4a86865bf67737fad2975..4d4276c050424faea3a602aa6a7e764d3e2c6199 100644 (file)
@@ -915,6 +915,9 @@ MUTATOR_HOOKFUNCTION(td_SetStartItems)
 
 MUTATOR_HOOKFUNCTION(td_TurretSpawn)
 {
+       if(self.realowner == world)
+               return TRUE; // wasn't spawned by a player
+               
        self.bot_attack = FALSE;
        self.turret_buff = 1;
        
@@ -1048,7 +1051,7 @@ MUTATOR_DEFINITION(gamemode_td)
                if(time > 1) // game loads at time 1
                        error("This is a game type and it cannot be added at runtime.");        
                cvar_settemp("g_monsters", "1");
-               cvar_settemp("g_turrets", "1"); // TODO: disable mapper added turrets?
+               cvar_settemp("g_turrets", "1");
                td_Init();
        }