Add player damage animation

This commit is contained in:
Eliy21 2023-12-17 21:18:57 +00:00
parent 200f7451eb
commit 12109e7f44

View file

@ -228,6 +228,8 @@ minetest.register_globalstep(function(dtime)
-- Apply animations based on what the player is doing -- Apply animations based on what the player is doing
if player:get_hp() == 0 then if player:get_hp() == 0 then
player_set_animation(player, "die") player_set_animation(player, "die")
elseif player:get_meta():get_int("mcl_damage:damage_animation") > 0 then
player_set_animation(player, "walk", animation_speed_mod)
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