From a88a521b986cd099f7a8ac109a8de983dcf860e1 Mon Sep 17 00:00:00 2001 From: Giov4 Date: Fri, 28 Aug 2020 17:01:04 +0000 Subject: [PATCH] CRASHFIX: broadcasting a message via the builitin HUD made the game crash if it had a duration specified --- _hud/hud_main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_hud/hud_main.lua b/_hud/hud_main.lua index fc5fbde..06eedad 100644 --- a/_hud/hud_main.lua +++ b/_hud/hud_main.lua @@ -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