Fetchr

Fetchr

556 Downloads

"Switch to spectator mode" clickable in lobby

UnlucksMcGee opened this issue ยท 2 comments

commented

Version: 5.0-pre2

If you generate a card, start a game and return back to the lobby, then you can still /trigger bingo.spectator.
This leads to other issues in the next game where after you teleport to bingo:multi_noise you'll be in spectator mode, so you don't fall down to the ground but instead, your spawn point is set up in the air.

I'm unsure exactly how it's happening.
In bingo:util/go_to_lobby.mcfunction:

scoreboard players reset @s bingo.spectator

But maybe the line in bingo:game/player_tick.mcfunction:

scoreboard players enable @s[tag=!bingo.spectator] bingo.spectator

somehow runs after the reset command above runs?

commented

Could test by inserting 2 debug /say commands and see the order stuff is happening in.

commented

Actually, this is quite easily explained by this order

execute if entity @s[scores={bingo.lobby=1}] run function bingo:util/go_to_lobby
scoreboard players enable @s[tag=!bingo.spectator] bingo.spectator