summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2018-08-03 10:06:05 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2018-08-03 10:06:05 +0100
commitda0238cb846beb7a79b64c7b3e4386df6b0ab5d2 (patch)
treeff25d45ea621291b50487fb37ef4ae30455c1d92
parent0482581f1893c706f6698238a7630a1f9c7f73c4 (diff)
fix animation flip
-rw-r--r--api.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/api.lua b/api.lua
index b22d410..917bf66 100644
--- a/api.lua
+++ b/api.lua
@@ -182,6 +182,12 @@ local set_animation = function(self, anim)
self.animation.current = self.animation.current or ""
+ -- only set different animation
+ if anim ~= "punch" and anim ~= "shoot"
+ and string.find(self.animation.current, anim) then
+ return
+ end
+
-- check for more than one animation
local num = 0