summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-07-26 18:13:39 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-07-26 18:13:39 +0100
commit8ad63d35d08b5dd08f2d4b6aecc0c39dc6caafc6 (patch)
treec24dfb8f478d80f104d63c13107924dc268333c0 /api.lua
parentc0e07d819b068d74a2f9164fce3343d12528b9a5 (diff)
if no run animation use walk instead
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/api.lua b/api.lua
index 6e368a5..cb3d779 100644
--- a/api.lua
+++ b/api.lua
@@ -1658,7 +1658,11 @@ local do_states = function(self, dtime)
set_velocity(self, self.run_velocity)
end
- set_animation(self, "run")
+ if self.animation and self.animation.run_start then
+ set_animation(self, "run")
+ else
+ set_animation(self, "walk")
+ end
else
set_velocity(self, 0)
set_animation(self, "punch")
@@ -1831,7 +1835,11 @@ local do_states = function(self, dtime)
set_velocity(self, self.run_velocity)
end
- set_animation(self, "run")
+ if self.animation and self.animation.run_start then
+ set_animation(self, "run")
+ else
+ set_animation(self, "walk")
+ end
end
else -- rnd: if inside reach range