mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Merge pull request 'Fix long globalstep for inactive shields' (#2489) from fix-shields-gs into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2489 Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
commit
fac88fc53d
1 changed files with 5 additions and 6 deletions
|
@ -219,12 +219,11 @@ end
|
|||
local shield_hud = {}
|
||||
|
||||
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])
|
||||
shield_hud[player] = nil
|
||||
set_shield(player, false, 1)
|
||||
set_shield(player, false, 2)
|
||||
end
|
||||
|
||||
local hf = player:hud_get_flags()
|
||||
if not hf.wielditem then
|
||||
|
|
Loading…
Reference in a new issue