MutableModelBehaviorComponent pass

This commit is contained in:
David Markowitz 2023-07-09 20:56:04 -07:00
parent 7ca9e59ef2
commit 83780affbd
3 changed files with 10 additions and 11 deletions

View File

@ -56,7 +56,7 @@ struct MovementAIInfo {
* Component that handles the movement settings of an entity. Not to be confused with the BaseCombatAI component that
* actually handles attackig and following enemy entities.
*/
class MovementAIComponent : public Component {
class MovementAIComponent final : public Component {
public:
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MOVEMENT_AI;

View File

@ -9,22 +9,21 @@ MutableModelBehaviorComponent::MutableModelBehaviorComponent(Entity* parent) : C
m_DirtyModelEditingInfo = false;
m_OldObjId = LWOOBJID_EMPTY;
m_Editor = LWOOBJID_EMPTY;
}
void MutableModelBehaviorComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
outBitStream->Write(m_DirtyModelBehaviorInfo || bIsInitialUpdate);
if (m_DirtyModelBehaviorInfo){
if (m_DirtyModelBehaviorInfo || bIsInitialUpdate) {
outBitStream->Write(m_BehaviorCount);
outBitStream->Write(m_IsPaused);
m_DirtyModelBehaviorInfo = false;
}
outBitStream->Write(m_DirtyModelEditingInfo && bIsInitialUpdate);
if (m_DirtyModelEditingInfo && bIsInitialUpdate) {
outBitStream->Write(m_OldObjId);
outBitStream->Write(m_Editor);
m_DirtyModelEditingInfo = false;
if (!bIsInitialUpdate) m_DirtyModelEditingInfo = false;
}
if (!bIsInitialUpdate) m_DirtyModelBehaviorInfo = false;
}
}

View File

@ -11,7 +11,7 @@ class Entity;
/**
* Component that represents entities that are a model, e.g. collectible models and BBB models.
*/
class MutableModelBehaviorComponent : public Component {
class MutableModelBehaviorComponent final : public Component {
public:
static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL_BEHAVIOR;