File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -113,14 +113,8 @@ minetest.register_globalstep(function()
113
113
local model = model_name and models [model_name ]
114
114
if model and not player_attached [name ] then
115
115
local controls = player :get_player_control ()
116
- local walking = false
117
116
local animation_speed_mod = model .animation_speed or 30
118
117
119
- -- Determine if the player is walking
120
- if controls .up or controls .down or controls .left or controls .right then
121
- walking = true
122
- end
123
-
124
118
-- Determine if the player is sneaking, and reduce animation speed if so
125
119
if controls .sneak then
126
120
animation_speed_mod = animation_speed_mod / 2
@@ -129,7 +123,8 @@ minetest.register_globalstep(function()
129
123
-- Apply animations based on what the player is doing
130
124
if player :get_hp () == 0 then
131
125
player_set_animation (player , " lay" )
132
- elseif walking then
126
+ -- Determine if the player is walking
127
+ elseif controls .up or controls .down or controls .left or controls .right then
133
128
if player_sneak [name ] ~= controls .sneak then
134
129
player_anim [name ] = nil
135
130
player_sneak [name ] = controls .sneak
You can’t perform that action at this time.
0 commit comments