From: Mario Date: Mon, 2 Sep 2013 01:16:35 +0000 (+1000) Subject: Fix double score for killing re-spawned zombies X-Git-Tag: xonotic-v0.8.0~241^2^2~92 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8543c90f3900e861ea7da4c799685776c001a147;p=xonotic%2Fxonotic-data.pk3dir.git Fix double score for killing re-spawned zombies --- diff --git a/qcsrc/server/mutators/gamemode_invasion.qc b/qcsrc/server/mutators/gamemode_invasion.qc index ab8bbd2f7..fc3677b20 100644 --- a/qcsrc/server/mutators/gamemode_invasion.qc +++ b/qcsrc/server/mutators/gamemode_invasion.qc @@ -169,11 +169,14 @@ void Invasion_RoundStart() MUTATOR_HOOKFUNCTION(invasion_MonsterDies) { - numkilled += 1; - maxcurrent -= 1; + if not(self.monster_respawned) + { + numkilled += 1; + maxcurrent -= 1; - if(IS_PLAYER(frag_attacker)) - PlayerScore_Add(frag_attacker, SP_KILLS, +1); + if(IS_PLAYER(frag_attacker)) + PlayerScore_Add(frag_attacker, SP_KILLS, +1); + } return FALSE; } @@ -188,8 +191,11 @@ MUTATOR_HOOKFUNCTION(invasion_MonsterSpawn) return FALSE; } - numspawned += 1; - maxcurrent += 1; + if not(self.monster_respawned) + { + numspawned += 1; + maxcurrent += 1; + } self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP | DPCONTENTS_MONSTERCLIP;