fix: constructions keep pending changes of five more components

The level, forced movement, possessable, possessor and combat AI parts
are each read behind a flag bit (LWOLevelProgressionComponent::
Deserialize 0x00c63bd0 and the others). DLU cleared their dirty flags
when it wrote a construction, which goes only to the client the object
came into range of, so a change waiting for the next update never
reached the clients already watching: a level up, a mount or dismount,
a rail ride.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 13:26:31 -06:00
parent 7893185cad
commit 1382606bd1
6 changed files with 39 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ void PossessableComponent::LoadDataFromTemplate() {
void PossessableComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) {
outBitStream.Write(m_DirtyPossessable || bIsInitialUpdate);
if (m_DirtyPossessable || bIsInitialUpdate) {
m_DirtyPossessable = false; // reset flag
if (!bIsInitialUpdate) m_DirtyPossessable = false; // reset flag
outBitStream.Write(m_Possessor != LWOOBJID_EMPTY);
if (m_Possessor != LWOOBJID_EMPTY) outBitStream.Write(m_Possessor);
@@ -45,7 +45,7 @@ void PossessableComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsIn
if (m_AnimationFlag != eAnimationFlags::IDLE_NONE) outBitStream.Write(m_AnimationFlag);
outBitStream.Write(m_ImmediatelyDepossess);
m_ImmediatelyDepossess = false; // reset flag
if (!bIsInitialUpdate) m_ImmediatelyDepossess = false; // reset flag
}
}