From: Mario Date: Thu, 26 Dec 2013 06:39:51 +0000 (+1100) Subject: Don't check if monster has re-spawned when lowering counts X-Git-Tag: xonotic-v0.8.0~241^2^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f38d2a98e9da344460c3412de5164325972087c6;p=xonotic%2Fxonotic-data.pk3dir.git Don't check if monster has re-spawned when lowering counts --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 038ffb58c..927501e65 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -384,8 +384,7 @@ void Monster_Fade () totalspawned -= 1; if(IS_CLIENT(self.realowner)) - if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) - self.realowner.monstercount -= 1; + self.realowner.monstercount -= 1; SUB_SetFade(self, time + 3, 1); } @@ -781,8 +780,10 @@ void monsters_corpse_damage (entity inflictor, entity attacker, float damage, fl { Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16, self, attacker); + // number of monsters spawned with mobspawn command + totalspawned -= 1; + if(IS_CLIENT(self.realowner)) - if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) self.realowner.monstercount -= 1; self.think = SUB_Remove; @@ -807,13 +808,12 @@ void monster_die(entity attacker, float gibbed) if(autocvar_g_monsters_score_spawned || !((self.spawnflags & MONSTERFLAG_SPAWNED) || (self.spawnflags & MONSTERFLAG_RESPAWNED))) PlayerScore_Add(attacker, SP_SCORE, +autocvar_g_monsters_score_kill); - if(!Monster_CanRespawn(self) && gibbed) + if(gibbed) { // number of monsters spawned with mobspawn command totalspawned -= 1; if(IS_CLIENT(self.realowner)) - if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) self.realowner.monstercount -= 1; }