diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-07-26 18:13:39 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-07-26 18:13:39 +0100 |
commit | 8ad63d35d08b5dd08f2d4b6aecc0c39dc6caafc6 (patch) | |
tree | c24dfb8f478d80f104d63c13107924dc268333c0 /api.lua | |
parent | c0e07d819b068d74a2f9164fce3343d12528b9a5 (diff) |
if no run animation use walk instead
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 |