From 73b4d3c1d2c74cb5bd5bb23604ce1d74e183cb0d Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Fri, 23 Apr 2021 16:31:13 -0400 Subject: [PATCH] stop projectile mobs from being completely disabled while stunned --- mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index cf397d97ad..f914ab9d58 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -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