From e80a4596d8c945bb87ff853a30da6d4b740c10c5 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Tue, 16 Apr 2024 20:25:23 +0000 Subject: [PATCH] mods - mobs - fix stop mob attacking if player isnt seen when explode * the stop is only after double check , but must be after first also --- api.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.lua b/api.lua index 35682a6..47cfec3 100644 --- a/api.lua +++ b/api.lua @@ -2561,6 +2561,8 @@ function mob_class:do_states(dtime) --print(" ** stop attacking **", self.name, self.health, dist, self.view_range) self:stop_attack() end + if not p then + self:stop_attack() return end