Fix single-player position not loading on login

loadSinglePlayerCharacterState was updating the character struct but not
movementInfo, which startSinglePlayer uses for spawn position. Now sets
movementInfo.x/y/z/orientation from saved state.
This commit is contained in:
Kelsi 2026-02-05 23:18:22 -08:00
parent 9e3d12c0dc
commit 3347a84656

View file

@ -1530,6 +1530,12 @@ bool GameHandler::loadSinglePlayerCharacterState(uint64_t guid) {
spSavedOrientation_[guid] = orientation;
if (!hasState) return false;
// Update movementInfo so startSinglePlayer can use it for spawning
movementInfo.x = posX;
movementInfo.y = posY;
movementInfo.z = posZ;
movementInfo.orientation = orientation;
// Update character list entry
for (auto& ch : characters) {
if (ch.guid == guid) {