Fix long globalstep for inactive shields
This commit is contained in:
parent
e6d1f603ff
commit
1743b8791b
|
@ -219,12 +219,11 @@ end
|
||||||
local shield_hud = {}
|
local shield_hud = {}
|
||||||
|
|
||||||
local function remove_shield_hud(player)
|
local function remove_shield_hud(player)
|
||||||
if shield_hud[player] then
|
if not shield_hud[player] then return end --this function takes a long time. only run it when necessary
|
||||||
player:hud_remove(shield_hud[player])
|
player:hud_remove(shield_hud[player])
|
||||||
shield_hud[player] = nil
|
shield_hud[player] = nil
|
||||||
set_shield(player, false, 1)
|
set_shield(player, false, 1)
|
||||||
set_shield(player, false, 2)
|
set_shield(player, false, 2)
|
||||||
end
|
|
||||||
|
|
||||||
local hf = player:hud_get_flags()
|
local hf = player:hud_get_flags()
|
||||||
if not hf.wielditem then
|
if not hf.wielditem then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user