feat: a player's construction can leave out its position and world transition

For the one construction a client gets of its own player after a seamless instance move. The client applies a
construction's frame to its player at once (LWOBasePhysComponent::Deserialize, 0x00bf5a10), and world transition
state 0 makes it fade the screen in from white (LWOCharacterComponent::PostCharacterLoaded, 0x00c71660). State 3 is
read but nothing acts on it. Nothing sets either flag yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 15:15:16 -06:00
parent 7695445c4c
commit f081dafb94
5 changed files with 124 additions and 8 deletions

View File

@@ -141,8 +141,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);