mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-11 01:29:36 +01:00
Re-implement animation check gate for mobs
This commit is contained in:
parent
a934a59f3b
commit
f38492bcb0
1 changed files with 8 additions and 2 deletions
|
@ -13,8 +13,14 @@ mobs.set_animation = function(self, anim, fixed_frame)
|
||||||
|
|
||||||
self.animation.current = self.animation.current or ""
|
self.animation.current = self.animation.current or ""
|
||||||
|
|
||||||
|
--animations break if they are constantly set
|
||||||
|
--so we put this return gate to check if it is
|
||||||
|
--already at the animation we are trying to implement
|
||||||
|
if self.animation.current == anim then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if (not self.animation[anim .. "_start"] or not self.animation[anim .. "_end"]) then
|
if (not self.animation[anim .. "_start"] or not self.animation[anim .. "_end"]) then
|
||||||
print("largablarga")
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue