Skip to content

Commit

Permalink
Set the name of local player in starmap from Icarus to user name
Browse files Browse the repository at this point in the history
  • Loading branch information
starfi5h committed Dec 7, 2022
1 parent c1981f4 commit 2b7ad6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NebulaWorld/RemotePlayerModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void Destroy()
PlayerInstance = null;
if (StarmapTracker != null)
{
Object.Destroy(StarmapTracker);
Object.Destroy(StarmapTracker.gameObject);
}

if (StarmapNameText != null)
Expand Down
3 changes: 2 additions & 1 deletion NebulaWorld/SimulatedWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public void SetupInitialPlayerState()
{
player.Data.Mecha.SandCount = GameMain.mainPlayer.sandCount;
}

// Set the name of local player in starmap from Icarus to user name
GameMain.mainPlayer.mecha.appearance.overrideName = " " + player.Data.Username + " ";
// Finally we need add the local player components to the player character
localPlayerMovement = GameMain.mainPlayer.gameObject.AddComponentIfMissing<LocalPlayerMovement>();
// ChatManager should continuous exsit until the game is closed
Expand Down

0 comments on commit 2b7ad6d

Please sign in to comment.