Skip to content

Commit

Permalink
Mtn v3 - fix spectate bug during final battle
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerkiz committed Jun 12, 2024
1 parent 2afbf25 commit 06e3bce
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions maps/mountain_fortress_v3/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -677,16 +677,12 @@ Gui.on_click(
end

local player = event.player
if not player or not player.valid then
return
end

if Public.get('final_battle') then
return player.print('Not possible during the final battle.', Color.warning)
end

if player.character and player.character.valid then
local success = Public.set_player_to_spectator(player)
if not player or not player.valid then
return
end

if player.character and player.character.valid then
local success = Public.set_player_to_spectator(player)
if success then
hide_all_gui(player)
end
Expand Down

0 comments on commit 06e3bce

Please sign in to comment.