Core/PacketIO: Fixed SMSG_UPDATE_OBJECT fragment changes mask initialization

This commit is contained in:
Shauren
2024-11-02 12:32:21 +01:00
parent 05c8ad26c2
commit 0435f22d0d
2 changed files with 4 additions and 1 deletions

View File

@@ -52,7 +52,10 @@ void EntityFragmentsHolder::Add(EntityFragment fragment, bool update)
{
UpdateableMasks[i] = 1 << maskIndex++;
if (IsIndirectFragment(UpdateableIds[i]))
{
ContentsChangedMask |= UpdateableMasks[i]; // set the first bit to true to activate fragment
UpdateableMasks[i] |= 1 << maskIndex++;
}
}
}

View File

@@ -83,7 +83,7 @@ struct EntityFragmentsHolder
std::array<EntityFragment, 2> UpdateableIds = { EntityFragment::End, EntityFragment::End };
std::array<uint8, 2> UpdateableMasks = { };
uint8 UpdateableCount = 0;
uint8 ContentsChangedMask = CGObjectActiveMask;
uint8 ContentsChangedMask = 0;
void Add(EntityFragment fragment, bool update);
void Remove(EntityFragment fragment);