1
0
Fork 0

Add a prevention in case players get stuck with the damage animation

This commit is contained in:
Eliy21 2023-12-18 22:04:12 +00:00
parent fe90424ee4
commit 44c656502f
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ minetest.register_globalstep(function(dtime)
player_set_animation(player, "die") player_set_animation(player, "die")
elseif player:get_meta():get_int("mcl_damage:damage_animation") > 0 then elseif player:get_meta():get_int("mcl_damage:damage_animation") > 0 then
player_set_animation(player, "walk", animation_speed_mod) player_set_animation(player, "walk", animation_speed_mod)
minetest.after(0.5, function()
player:get_meta():set_int("mcl_damage:damage_animation", 0)
end)
elseif mcl_playerplus.elytra[player] and mcl_playerplus.elytra[player].active then elseif mcl_playerplus.elytra[player] and mcl_playerplus.elytra[player].active then
player_set_animation(player, "stand") player_set_animation(player, "stand")
elseif walking and velocity.x > 0.35 elseif walking and velocity.x > 0.35