Temp workaround: prevent spectators to display the info panel and avoid crash
This commit is contained in:
parent
1286363582
commit
16e658b8b9
@ -2,7 +2,7 @@ controls.register_on_press(function(player, key)
|
||||
|
||||
local p_name = player:get_player_name()
|
||||
|
||||
if not arena_lib.is_player_in_arena(p_name, "block_league") then return end
|
||||
if not arena_lib.is_player_in_arena(p_name, "block_league") or arena_lib.is_player_spectating(p_name) then return end
|
||||
|
||||
if key == "aux1" and not arena_lib.get_arena_by_player(p_name).in_celebration then
|
||||
panel_lib.get_panel(p_name, "bl_info_panel"):show()
|
||||
@ -15,7 +15,7 @@ controls.register_on_hold(function(player, key)
|
||||
|
||||
local p_name = player:get_player_name()
|
||||
|
||||
if key~="LMB" or not arena_lib.is_player_in_arena(p_name, "block_league") then return end
|
||||
if key~="LMB" or not arena_lib.is_player_in_arena(p_name, "block_league") or arena_lib.is_player_spectating(p_name) then return end
|
||||
|
||||
local weapon_name = player:get_wielded_item():get_name()
|
||||
local weap_def = minetest.registered_nodes[weapon_name]
|
||||
@ -32,7 +32,7 @@ controls.register_on_release(function(player, key)
|
||||
|
||||
local p_name = player:get_player_name()
|
||||
|
||||
if not arena_lib.is_player_in_arena(p_name, "block_league") then return end
|
||||
if not arena_lib.is_player_in_arena(p_name, "block_league") or arena_lib.is_player_spectating(p_name) then return end
|
||||
|
||||
-- AUX1
|
||||
if key == "aux1" and not arena_lib.get_arena_by_player(p_name).in_celebration then
|
||||
|
Loading…
x
Reference in New Issue
Block a user