]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix turrets shooting players during build phase
authorMario <mario.mario@y7mail.com>
Thu, 18 Apr 2013 08:45:40 +0000 (18:45 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 18 Apr 2013 08:45:40 +0000 (18:45 +1000)
qcsrc/server/mutators/gamemode_towerdefense.qc

index 08a516b43e9f9f7095eef08e82516fa7c6d90b53..ea34f76b3f02c955cc736d9ddbba170a2eacc50a 100644 (file)
@@ -667,7 +667,10 @@ void td_Initialize()
 MUTATOR_HOOKFUNCTION(td_TurretValidateTarget)
 {
        if(time < game_starttime || current_phase != PHASE_COMBAT)
+       {
+               turret_target = world;
                return FALSE; // battle hasn't started
+       }
 
        if(turret_flags & TFL_TARGETSELECT_MISSILESONLY)
     if(turret_target.flags & FL_PROJECTILE)