CRASHFIX: changing spectated target lead to a crash if the new spectated player disconnected right after (closes #92)

This commit is contained in:
Zughy 2023-08-03 08:40:11 +02:00
parent 1ff692f360
commit 15f88fec10

View File

@ -232,6 +232,7 @@ arena_lib.on_change_spectated_target("block_league", function(arena, sp_name, t_
-- ritardo di 0.1 perché on_join non è ancora stato chiamato, quindi non hanno ancora la HUD
minetest.after(0.1, function()
if not minetest.get_player_by_name(t_name) then return end
for _, weap_name in pairs(block_league.get_player_weapons(t_name)) do
block_league.HUD_weapons_update(arena, t_name, weap_name)
end