From 38e32b3075984f799bab2a1b325afb3afce0ae12 Mon Sep 17 00:00:00 2001 From: itayalroy Date: Sat, 4 Apr 2026 23:30:14 +0300 Subject: [PATCH] Fix login scene cleanup ordering Previously, the client requested the new account's character list first and then cleaned up the old login scene. If the server responded quickly, the new characters could be created and then immediately cleared by the late cleanup, leaving the character selection screen empty. Reproduce against a local OpenMU server: log into one account, return to server selection, then log into a different account and the character selection screen appears empty. --- src/source/Scenes/LoginScene.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/source/Scenes/LoginScene.cpp b/src/source/Scenes/LoginScene.cpp index 213c1e441..0bc19b128 100644 --- a/src/source/Scenes/LoginScene.cpp +++ b/src/source/Scenes/LoginScene.cpp @@ -345,13 +345,13 @@ void NewMoveLogInScene() CCameraMove::GetInstancePtr()->SetTourMode(FALSE); + // Tear down the login scene data before asking the server for the + // account characters, otherwise a fast reply can be cleared again. + ReleaseLogoSceneData(); + SceneFlag = CHARACTER_SCENE; CurrentProtocolState = REQUEST_CHARACTERS_LIST; SocketClient->ToGameServer()->SendRequestCharacterList(g_pMultiLanguage->GetLanguage()); - - ReleaseLogoSceneData(); - - ClearCharacters(); } g_ConsoleDebug->UpdateMainScene();