mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-12 02:40:21 +01:00
if no run animation use walk instead
This commit is contained in:
parent
c0e07d819b
commit
8ad63d35d0
12
api.lua
12
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
|
||||
|
Loading…
Reference in New Issue
Block a user