Crashfix: controllo se giocatore è in arena quando finisce il caricamento dell'arma
parent
2b58798e40
commit
4d81911daa
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue