From 12109e7f44c49f5f4c8815717377a2a5410f12fc Mon Sep 17 00:00:00 2001 From: Eliy21 Date: Sun, 17 Dec 2023 21:18:57 +0000 Subject: [PATCH] Add player damage animation --- mods/PLAYER/mcl_player/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/PLAYER/mcl_player/init.lua b/mods/PLAYER/mcl_player/init.lua index 288b697e1..8ebcedccf 100644 --- a/mods/PLAYER/mcl_player/init.lua +++ b/mods/PLAYER/mcl_player/init.lua @@ -228,6 +228,8 @@ minetest.register_globalstep(function(dtime) -- Apply animations based on what the player is doing if player:get_hp() == 0 then 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 player_set_animation(player, "stand") elseif walking and velocity.x > 0.35