From: Mario Date: Fri, 30 Aug 2013 10:17:28 +0000 (+1000) Subject: Zombie re-spawns regardless of settings X-Git-Tag: xonotic-v0.8.0~241^2^2~130 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b3efa20d9e9ab113d3884bac94a192e928736f1c;p=xonotic%2Fxonotic-data.pk3dir.git Zombie re-spawns regardless of settings --- diff --git a/qcsrc/common/monsters/monster/zombie.qc b/qcsrc/common/monsters/monster/zombie.qc index 880f7c08f..53b392ca2 100644 --- a/qcsrc/common/monsters/monster/zombie.qc +++ b/qcsrc/common/monsters/monster/zombie.qc @@ -143,12 +143,15 @@ float m_zombie(float req) { if not(self.health) self.health = MON_CVAR(zombie, health); + if(self.spawnflags & MONSTERFLAG_NORESPAWN) + self.spawnflags &~= MONSTERFLAG_NORESPAWN; // zombies always respawn + self.monster_loot = spawnfunc_item_health_medium; self.monster_attackfunc = zombie_attack; monsters_setframe(zombie_anim_spawn); self.spawn_time = time + 2.1; self.spawnshieldtime = self.spawn_time; - self.respawntime = 0.1; + self.respawntime = 0.2; return TRUE; } diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 3c8d25c13..aa0f0d0fb 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -266,10 +266,9 @@ void Monster_Fade () self.SendFlags |= MSF_MOVE; self.SendFlags |= MSF_STATUS; - - return; } - SUB_SetFade(self, time + 3, 1); + else + SUB_SetFade(self, time + 3, 1); } float Monster_CanJump (vector vel) @@ -956,7 +955,7 @@ void monster_spawn() self.think = monster_think; self.nextthink = time + self.ticrate; - self.SendFlags = MSF_SETUP; + self.SendFlags |= MSF_SETUP; } float monster_initialize(float mon_id, float nodrop)