Skip to content

fix: player name invisible in chatbox upon login#1095

Open
DesecratedTree wants to merge 3 commits into
GregHib:mainfrom
DesecratedTree:bugs
Open

fix: player name invisible in chatbox upon login#1095
DesecratedTree wants to merge 3 commits into
GregHib:mainfrom
DesecratedTree:bugs

Conversation

@DesecratedTree

Copy link
Copy Markdown

Root cause: The chatbox CS2 script reads the player's name from the local player's appearance data. But the appearance data is only sent during the game tick via PlayerUpdateTask. The chatbox opens during spawn() before the first tick runs, so the client has no name and falls back to [quickchaticon].

Fix in AccountManager.kt:89: Added PlayerUpdateTask().run(player) after loadCallback (which adds the player to the viewport tracking set) but before player.open(gameFrame). This manually sends the player update (including appearance data with displayName) to the client before the chatbox opens.

@skalfate

Copy link
Copy Markdown
Contributor

What an obscure bug. Interesting how you came to that one.

@DesecratedTree

Copy link
Copy Markdown
Author

What an obscure bug. Interesting how you came to that one.

Just a minor annoyance I've been chasing for a while. Noticed it a few times while playing live server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants