Added comment

This commit is contained in:
EmosewaMC 2022-06-15 23:04:03 -07:00
parent 7dfcd22a2e
commit 09c459a083
2 changed files with 4 additions and 0 deletions

View File

@ -975,6 +975,8 @@ void Entity::WriteBaseReplicaData(RakNet::BitStream* outBitStream, eReplicaPacke
}
else outBitStream->Write0(); //No GM Level
}
// Only serialize parent / child info should the info be dirty (changed) or if this is the construction of the entity.
outBitStream->Write((m_ParentEntity != nullptr || m_ChildEntities.size() > 0) && (m_IsParentChildDirty || packetType == PACKET_TYPE_CONSTRUCTION));
if ((m_ParentEntity != nullptr || m_ChildEntities.size() > 0) && (m_IsParentChildDirty || packetType == PACKET_TYPE_CONSTRUCTION)) {
m_IsParentChildDirty = false;

View File

@ -23,6 +23,8 @@ RebuildComponent::RebuildComponent(Entity* entity) : Component(entity) {
m_Precondition = new PreconditionExpression(GeneralUtils::UTF16ToWTF8(checkPreconditions));
}
// Should a setting that has the build activator position exist, fetch that setting here and parse it for position.
// It is assumed that the user who sets this setting uses the correct character delimiter (character 31)
auto positionAsVector = GeneralUtils::SplitString(m_Parent->GetVarAsString(u"rebuild_activators"), 31);
if (positionAsVector.size() == 3) {
m_ActivatorPosition.x = std::stof(positionAsVector[0]);