mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-02-13 09:00:20 +01:00
fix timer bug
This commit is contained in:
parent
fc7269cc8c
commit
77b53b9054
5
api.lua
5
api.lua
@ -21,7 +21,7 @@ end
|
|||||||
-- Global
|
-- Global
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20240701",
|
version = "20240716",
|
||||||
translate = S,
|
translate = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {},
|
invis = minetest.global_exists("invisibility") and invisibility or {},
|
||||||
node_snow = has(minetest.registered_aliases["mapgen_snow"])
|
node_snow = has(minetest.registered_aliases["mapgen_snow"])
|
||||||
@ -2666,11 +2666,12 @@ function mob_class:do_states(dtime)
|
|||||||
|
|
||||||
if self.timer > 1 then
|
if self.timer > 1 then
|
||||||
|
|
||||||
|
self.timer = 0
|
||||||
|
|
||||||
-- no custom attack or custom attack returns true to continue
|
-- no custom attack or custom attack returns true to continue
|
||||||
if not self.custom_attack
|
if not self.custom_attack
|
||||||
or self:custom_attack(self, p) == true then
|
or self:custom_attack(self, p) == true then
|
||||||
|
|
||||||
self.timer = 0
|
|
||||||
self:set_animation("punch")
|
self:set_animation("punch")
|
||||||
|
|
||||||
local p2 = p
|
local p2 = p
|
||||||
|
Loading…
Reference in New Issue
Block a user