Stop calling lzr_hand.set_hand over and over again
This commit is contained in:
parent
37f0e253fc
commit
73ce99e902
@ -78,10 +78,16 @@ local update_player_skin = function(player)
|
||||
end
|
||||
|
||||
lzr_damage.reset_player_damage = function(player)
|
||||
local player_was_scorched = player_is_scorched
|
||||
local player_was_damaged = player_damage > 0
|
||||
player_damage = 0
|
||||
player_is_scorched = false
|
||||
update_player_skin(player)
|
||||
update_damage_screen(player)
|
||||
if player_was_scorched then
|
||||
update_player_skin(player)
|
||||
end
|
||||
if player_was_damaged then
|
||||
update_damage_screen(player)
|
||||
end
|
||||
end
|
||||
|
||||
lzr_damage.damage_player = function(player, damage, damage_type)
|
||||
@ -109,7 +115,7 @@ end
|
||||
|
||||
local undamage_player = function(player)
|
||||
player_damage = math.max(0, player_damage - 1)
|
||||
if player_damage == 0 then
|
||||
if player_damage == 0 and player_is_scorched then
|
||||
player_is_scorched = false
|
||||
update_player_skin(player)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user