From: Mario Date: Mon, 4 Mar 2013 07:51:03 +0000 (+1100) Subject: Use ltime instead of .shal_cycles counter for shalrath/vore projectiles X-Git-Tag: xonotic-v0.8.0~241^2^2~489 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3a74ccc4eab9900eec5f777d62d8b2303a685ae4;p=xonotic%2Fxonotic-data.pk3dir.git Use ltime instead of .shal_cycles counter for shalrath/vore projectiles --- diff --git a/qcsrc/server/monsters/monster/shalrath.qc b/qcsrc/server/monsters/monster/shalrath.qc index 76c56d2fe..3a38cbda5 100644 --- a/qcsrc/server/monsters/monster/shalrath.qc +++ b/qcsrc/server/monsters/monster/shalrath.qc @@ -71,13 +71,11 @@ float shal_missile () return TRUE; } -.float shal_cycles; void ShalHome () { local vector dir = '0 0 0', vtemp = self.enemy.origin + '0 0 10'; - self.shal_cycles += 1; - if (self.enemy.health <= 0 || self.owner.health <= 0 || self.shal_cycles >= 20) + if (self.enemy.health <= 0 || self.owner.health <= 0 || time >= self.ltime) { remove(self); return; @@ -127,6 +125,7 @@ void ShalMissile () dist = vlen (self.enemy.origin - self.origin); missile.think = ShalHome; + missile.ltime = time + 7; missile.nextthink = time; missile.solid = SOLID_BBOX; missile.movetype = MOVETYPE_FLYMISSILE;