Re-implement animation check gate for mobs

This commit is contained in:
jordan4ibanez 2021-04-16 11:50:29 -04:00
parent a934a59f3b
commit f38492bcb0
1 changed files with 8 additions and 2 deletions

View File

@ -13,8 +13,14 @@ mobs.set_animation = function(self, anim, fixed_frame)
self.animation.current = self.animation.current or ""
if (not self.animation[anim .. "_start"] or not self.animation[anim .. "_end"]) then
print("largablarga")
--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
return
end