mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-01 15:01:06 +01:00
Remove unnecessary invul code & add damage animation code
This commit is contained in:
parent
c39e55e2d4
commit
200f7451eb
1 changed files with 4 additions and 4 deletions
|
@ -759,10 +759,10 @@ minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch,
|
||||||
else
|
else
|
||||||
mcl_playerplus_internal[name].last_damage = damage
|
mcl_playerplus_internal[name].last_damage = damage
|
||||||
mcl_playerplus_internal[name].invul_timestamp = time_now
|
mcl_playerplus_internal[name].invul_timestamp = time_now
|
||||||
local invul = player:get_meta():get_int("mcl_damage:invulnerable")
|
player:get_meta():set_int("mcl_damage:damage_animation", 1)
|
||||||
if invul > 0 then
|
minetest.after(0.5, function()
|
||||||
player:get_meta():set_int("mcl_damage:invulnerable", 0)
|
player:get_meta():set_int("mcl_damage:damage_animation", 0)
|
||||||
end
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue