mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-23 15:22:28 +00:00
MutableModelBehaviorComponent pass
This commit is contained in:
parent
7ca9e59ef2
commit
83780affbd
@ -56,7 +56,7 @@ struct MovementAIInfo {
|
|||||||
* Component that handles the movement settings of an entity. Not to be confused with the BaseCombatAI component that
|
* 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.
|
* actually handles attackig and following enemy entities.
|
||||||
*/
|
*/
|
||||||
class MovementAIComponent : public Component {
|
class MovementAIComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MOVEMENT_AI;
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MOVEMENT_AI;
|
||||||
|
|
||||||
|
@ -9,22 +9,21 @@ MutableModelBehaviorComponent::MutableModelBehaviorComponent(Entity* parent) : C
|
|||||||
m_DirtyModelEditingInfo = false;
|
m_DirtyModelEditingInfo = false;
|
||||||
m_OldObjId = LWOOBJID_EMPTY;
|
m_OldObjId = LWOOBJID_EMPTY;
|
||||||
m_Editor = LWOOBJID_EMPTY;
|
m_Editor = LWOOBJID_EMPTY;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MutableModelBehaviorComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
|
void MutableModelBehaviorComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
|
||||||
outBitStream->Write(m_DirtyModelBehaviorInfo || bIsInitialUpdate);
|
outBitStream->Write(m_DirtyModelBehaviorInfo || bIsInitialUpdate);
|
||||||
if (m_DirtyModelBehaviorInfo){
|
if (m_DirtyModelBehaviorInfo || bIsInitialUpdate) {
|
||||||
outBitStream->Write(m_BehaviorCount);
|
outBitStream->Write(m_BehaviorCount);
|
||||||
outBitStream->Write(m_IsPaused);
|
outBitStream->Write(m_IsPaused);
|
||||||
m_DirtyModelBehaviorInfo = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
outBitStream->Write(m_DirtyModelEditingInfo && bIsInitialUpdate);
|
outBitStream->Write(m_DirtyModelEditingInfo && bIsInitialUpdate);
|
||||||
if (m_DirtyModelEditingInfo && bIsInitialUpdate) {
|
if (m_DirtyModelEditingInfo && bIsInitialUpdate) {
|
||||||
outBitStream->Write(m_OldObjId);
|
outBitStream->Write(m_OldObjId);
|
||||||
outBitStream->Write(m_Editor);
|
outBitStream->Write(m_Editor);
|
||||||
m_DirtyModelEditingInfo = false;
|
if (!bIsInitialUpdate) m_DirtyModelEditingInfo = false;
|
||||||
|
}
|
||||||
|
if (!bIsInitialUpdate) m_DirtyModelBehaviorInfo = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class Entity;
|
|||||||
/**
|
/**
|
||||||
* Component that represents entities that are a model, e.g. collectible models and BBB models.
|
* 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:
|
public:
|
||||||
static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL_BEHAVIOR;
|
static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL_BEHAVIOR;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user