]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use ltime instead of .shal_cycles counter for shalrath/vore projectiles
authorMario <mario.mario@y7mail.com>
Mon, 4 Mar 2013 07:51:03 +0000 (18:51 +1100)
committerMario <mario.mario@y7mail.com>
Mon, 4 Mar 2013 07:51:03 +0000 (18:51 +1100)
qcsrc/server/monsters/monster/shalrath.qc

index 76c56d2fefc3e6f792aa9e75d8a692d5430359c8..3a38cbda57ce9255c63286c287272ca6dd371f6e 100644 (file)
@@ -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;