From 8543c90f3900e861ea7da4c799685776c001a147 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 2 Sep 2013 11:16:35 +1000 Subject: [PATCH] Fix double score for killing re-spawned zombies --- qcsrc/server/mutators/gamemode_invasion.qc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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; -- 2.39.2