From 0c298efe4df43524b2fbb26051b6754744522b63 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Fri, 2 Oct 2026 15:13:56 -0500 Subject: [PATCH] fix(character): arriving in a world starts at the target scene or the zone's spawn A player who had been to a world before arrived at that world's saved respawn point instead of the zone's spawn. The saved point is where a death in that world respawns, not where arriving starts. Co-Authored-By: Claude Opus 5.5 --- .../Physics/ControllablePhysicsComponent.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dGame/dComponents/Physics/ControllablePhysicsComponent.cpp b/dGame/dComponents/Physics/ControllablePhysicsComponent.cpp index c6c8545e4..d195546c4 100644 --- a/dGame/dComponents/Physics/ControllablePhysicsComponent.cpp +++ b/dGame/dComponents/Physics/ControllablePhysicsComponent.cpp @@ -187,8 +187,9 @@ void ControllablePhysicsComponent::LoadFromSaveData(const tinyxml2::XMLDocument& PlaceCharacter(); } -// If it came from another zone it starts at its respawn point, the target scene or the zone's spawn (Moon Base always: -// the saved place tends to be on the roof; a target scene too: only possible in a test map) +// If it came from another zone it starts at the target scene or the zone's spawn (Moon Base always: the saved place +// tends to be on the roof; a target scene too: only possible in a test map). A world's saved respawn point is where a +// death there respawns, not where arriving starts. void ControllablePhysicsComponent::PlaceCharacter() { auto* const character = m_Parent->GetCharacter(); if (!character) return; @@ -201,10 +202,7 @@ void ControllablePhysicsComponent::PlaceCharacter() { NiQuaternion rot = QuatUtils::IDENTITY; auto* targetScene = Game::entityManager->GetSpawnPointEntity(targetSceneName); - if (character->HasBeenToWorld(mapID) && targetSceneName.empty()) { - pos = character->GetRespawnPoint(mapID); - rot = Game::zoneManager->GetZone()->GetSpawnRot(); - } else if (targetScene != nullptr) { + if (targetScene != nullptr) { pos = targetScene->GetPosition(); rot = targetScene->GetRotation(); } else {