From 77b53b905443b894153ff6033c1a1e32261956bd Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 16 Jul 2024 07:21:50 +0100 Subject: [PATCH] fix timer bug --- api.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 56e87d1..db215d8 100644 --- a/api.lua +++ b/api.lua @@ -21,7 +21,7 @@ end -- Global mobs = { mod = "redo", - version = "20240701", + version = "20240716", translate = S, invis = minetest.global_exists("invisibility") and invisibility or {}, node_snow = has(minetest.registered_aliases["mapgen_snow"]) @@ -2666,11 +2666,12 @@ function mob_class:do_states(dtime) if self.timer > 1 then + self.timer = 0 + -- no custom attack or custom attack returns true to continue if not self.custom_attack or self:custom_attack(self, p) == true then - self.timer = 0 self:set_animation("punch") local p2 = p