Merge exp/seamless-transfer-2: seamless instance moves keep the player in place

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 16:49:22 -06:00
12 changed files with 220 additions and 39 deletions

View File

@@ -143,8 +143,11 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream& outBitStream, bo
if (!bIsInitialUpdate) m_DirtyBubble = false;
}
outBitStream.Write(m_DirtyPosition || bIsInitialUpdate);
if (m_DirtyPosition || bIsInitialUpdate) {
// A client that kept its player across a seamless instance move knows where it stands better than the save does:
// its construction leaves the frame out, and LWOBasePhysComponent::Deserialize (0x00bf5a10) then sets nothing
const bool writePosition = bIsInitialUpdate ? !m_KeepClientPosition : m_DirtyPosition;
outBitStream.Write(writePosition);
if (writePosition) {
outBitStream.Write(m_Position.x);
outBitStream.Write(m_Position.y);
outBitStream.Write(m_Position.z);