]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't keep following a dead teammate
authorMario <mario.mario@y7mail.com>
Fri, 8 Feb 2013 01:17:14 +0000 (12:17 +1100)
committerMario <mario.mario@y7mail.com>
Fri, 8 Feb 2013 01:17:14 +0000 (12:17 +1100)
qcsrc/server/mutators/gamemode_rts.qc

index 4ea8582d903b1d9490913de3dbb389426d93d3e9..6bebbabe6cabaaba605217176d2b8517ff620882 100644 (file)
@@ -247,6 +247,9 @@ MUTATOR_HOOKFUNCTION(rts_MonsterThink)
        if not(IsDifferentTeam(monster_target, self))
        {
                // following a fellow teammate, so attack their enemy
+               if(monster_target.deadflag != DEAD_NO)
+                       monster_target = world; // teammate died
+                       
                if(monster_target.enemy)
                {
                        self.enemy = monster_target.enemy;