Crashfix: controllo se giocatore è in arena quando finisce il caricamento dell'arma

master
Zughy 2020-11-02 21:57:06 +01:00
parent 2b58798e40
commit 4d81911daa
1 changed files with 5 additions and 6 deletions

View File

@ -493,12 +493,11 @@ function update_magazine(player, weapon)
p_meta:set_int("bl_reloading", 1) p_meta:set_int("bl_reloading", 1)
minetest.after(weapon.reload_time, function() minetest.after(weapon.reload_time, function()
if player then if not arena_lib.is_player_in_arena(p_name, "block_league") then return end
p_meta:set_int("bl_weap_delay", 0) p_meta:set_int("bl_weap_delay", 0)
p_meta:set_int("bl_reloading", 0) p_meta:set_int("bl_reloading", 0)
arena.players[p_name].weapons_magazine[w_name] = weapon.magazine arena.players[p_name].weapons_magazine[w_name] = weapon.magazine
block_league.weapons_hud_update(arena, p_name, w_name) block_league.weapons_hud_update(arena, p_name, w_name)
end
end) end)
end end