Skip to content

Commit

Permalink
Update the way the map loads the player.
Browse files Browse the repository at this point in the history
  • Loading branch information
Makosai committed Jan 1, 2024
1 parent 256f91a commit 974bdcc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/map_handler.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ class_name MapHandler extends Node
@export var load_player := true

func _ready():
GameManager.instance.load_player()

match MultiplayerManager.instance.status:
MultiplayerManager.Status.CLIENT:
var player_name := MultiplayerManager.instance.player_name

if player_name == null:
# Should send the player back to the Main Menu to fill out the name.
return
MultiplayerManager.instance.handler.register_player(player_name)

MultiplayerManager.instance.myClient.start_client()
return

GameManager.instance.load_player()

0 comments on commit 974bdcc

Please sign in to comment.