mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Fix stale player model persisting across logins by clearing character state on logout
This commit is contained in:
parent
34bda702e0
commit
d54aba3950
2 changed files with 6 additions and 0 deletions
|
|
@ -397,8 +397,13 @@ void Application::logoutToLogin() {
|
|||
}
|
||||
singlePlayerMode = false;
|
||||
npcsSpawned = false;
|
||||
playerCharacterSpawned = false;
|
||||
world.reset();
|
||||
if (renderer) {
|
||||
// Remove old player model so it doesn't persist into next session
|
||||
if (auto* charRenderer = renderer->getCharacterRenderer()) {
|
||||
charRenderer->removeInstance(1);
|
||||
}
|
||||
if (auto* music = renderer->getMusicManager()) {
|
||||
music->stopMusic(0.0f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue