CRASHFIX: broadcasting a message via the builitin HUD made the game crash if it had a duration specified

master
Giov4 2020-08-28 17:01:04 +00:00 committed by Zughy
parent 8b55b171c2
commit a88a521b98
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ function arena_lib.HUD_send_msg_all(HUD_type, arena, msg, duration, sound)
-- se duration non è specificata, permane all'infinito
if duration then
minetest.after(duration, function()
if minetest.get_player_by_name(p_name) == nil then return end
if minetest.get_player_by_name(pl_name) == nil then return end
-- se è stato aggiornato il messaggio, interrompo questo timer e lascio il controllo a quello nuovo
if HUD_type == "broadcast" and pl:hud_get(pl_HUD[2]).text ~= msg or
HUD_type == "hotbar" and pl:hud_get(pl_HUD[4]).text ~= msg then