stop projectile mobs from being completely disabled while stunned

This commit is contained in:
jordan4ibanez 2021-04-23 16:31:13 -04:00
parent eb7ae5e10e
commit 73b4d3c1d2

View file

@ -744,6 +744,14 @@ mobs.mob_step = function(self, dtime)
self.pause_timer = 0
end
--stop projectile mobs from being completely disabled while stunned
if self.projectile_timer and self.projectile_timer > 0.01 then
self.projectile_timer = self.projectile_timer - dtime
if self.projectile_timer < 0.01 then
self.projectile_timer = 0.01
end
end
return -- don't allow collision detection
--do normal ai
else