From 8ad63d35d08b5dd08f2d4b6aecc0c39dc6caafc6 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 26 Jul 2017 18:13:39 +0100 Subject: if no run animation use walk instead --- api.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'api.lua') 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 -- cgit v1.2.3