summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
Diffstat (limited to 'api.lua')
-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