Fixed broken mainmenu when player leaves game early
This commit is contained in:
parent
2cd4b21af5
commit
f9f92b16c1
1 changed files with 1 additions and 1 deletions
|
@ -11,9 +11,9 @@ func _process(delta):
|
||||||
|
|
||||||
func _on_yes_button_pressed():
|
func _on_yes_button_pressed():
|
||||||
if Global.goScene == "res://scenes/mainmenu-background.tscn":
|
if Global.goScene == "res://scenes/mainmenu-background.tscn":
|
||||||
|
Global.playingGame = false
|
||||||
if Global.teddyAuthorityID == 1:
|
if Global.teddyAuthorityID == 1:
|
||||||
Global.kickAllPlayers = true
|
Global.kickAllPlayers = true
|
||||||
Global.playingGame = false
|
|
||||||
await get_tree().create_timer(0.5).timeout
|
await get_tree().create_timer(0.5).timeout
|
||||||
Networking.peer.close()
|
Networking.peer.close()
|
||||||
get_tree().change_scene_to_file(Global.goScene)
|
get_tree().change_scene_to_file(Global.goScene)
|
||||||
|
|
Loading…
Reference in a new issue