Fixed broken mainmenu when player leaves game early

This commit is contained in:
Paul Black 2023-06-05 19:19:21 -06:00
parent 2cd4b21af5
commit f9f92b16c1

View file

@ -11,9 +11,9 @@ func _process(delta):
func _on_yes_button_pressed():
if Global.goScene == "res://scenes/mainmenu-background.tscn":
Global.playingGame = false
if Global.teddyAuthorityID == 1:
Global.kickAllPlayers = true
Global.playingGame = false
await get_tree().create_timer(0.5).timeout
Networking.peer.close()
get_tree().change_scene_to_file(Global.goScene)