diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 960439bf..79512737 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -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; diff --git a/dGame/dComponents/RebuildComponent.cpp b/dGame/dComponents/RebuildComponent.cpp index 538fdeed..25b7eb1b 100644 --- a/dGame/dComponents/RebuildComponent.cpp +++ b/dGame/dComponents/RebuildComponent.cpp @@ -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]);