minor improvement

This commit is contained in:
_Zaizen_ 2020-11-08 21:51:16 +01:00
parent cd9ab3b311
commit 65e40d98fe

View File

@ -30,15 +30,17 @@ end)
minetest.register_on_dieplayer(function(player)
if not arena_lib.is_player_in_arena(player:get_player_name(), "block_league") then return end
local p_name = player:get_player_name()
if not arena_lib.is_player_in_arena(p_name, "block_league") then return end
player:get_meta():set_int("bl_death_delay", 1)
block_league.immunity(player)
local arena = arena_lib.get_arena_by_player(player:get_player_name())
local arena = arena_lib.get_arena_by_player(p_name)
minetest.after(6, function()
if not player or arena.weapons_disabled then return end
if not arena_lib.is_player_in_arena(p_name, "block_league") or arena.weapons_disabled then return end
player:get_meta():set_int("bl_death_delay", 0)
player:get_meta():set_int("bl_reloading", 0)
end)