mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-11 01:48:07 +00:00
Fix Model Component Serialization (#655)
* Fix model component serialization * Update ModelComponent.h
This commit is contained in:
@@ -12,51 +12,50 @@ class Entity;
|
||||
*/
|
||||
class ModelComponent : public Component {
|
||||
public:
|
||||
static const uint32_t ComponentType = COMPONENT_TYPE_MODEL;
|
||||
static const uint32_t ComponentType = COMPONENT_TYPE_MODEL;
|
||||
|
||||
ModelComponent(uint32_t componentID, Entity* parent);
|
||||
~ModelComponent() override;
|
||||
ModelComponent(Entity* parent);
|
||||
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||
|
||||
/**
|
||||
* Returns the position of the model
|
||||
* @return the position of the model
|
||||
*/
|
||||
NiPoint3& GetPosition() { return m_Position; }
|
||||
/**
|
||||
* Returns the original position of the model
|
||||
* @return the original position of the model
|
||||
*/
|
||||
const NiPoint3& GetPosition() { return m_OriginalPosition; }
|
||||
|
||||
/**
|
||||
* Sets the position of the model
|
||||
* @param pos the position to set
|
||||
*/
|
||||
void SetPosition(const NiPoint3& pos) { m_Position = pos; }
|
||||
/**
|
||||
* Sets the original position of the model
|
||||
* @param pos the original position to set
|
||||
*/
|
||||
void SetPosition(const NiPoint3& pos) { m_OriginalPosition = pos; }
|
||||
|
||||
/**
|
||||
* Returns the rotation of the model
|
||||
* @return the rotation of the model
|
||||
*/
|
||||
NiQuaternion& GetRotation() { return m_Rotation; }
|
||||
/**
|
||||
* Returns the original rotation of the model
|
||||
* @return the original rotation of the model
|
||||
*/
|
||||
const NiQuaternion& GetRotation() { return m_OriginalRotation; }
|
||||
|
||||
/**
|
||||
* Sets the rotation of the model
|
||||
* @param rot the rotation to set
|
||||
*/
|
||||
void SetRotation(const NiQuaternion& rot) { m_Rotation = rot; }
|
||||
/**
|
||||
* Sets the original rotation of the model
|
||||
* @param rot the original rotation to set
|
||||
*/
|
||||
void SetRotation(const NiQuaternion& rot) { m_OriginalRotation = rot; }
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* The position of the model
|
||||
*/
|
||||
NiPoint3 m_Position;
|
||||
/**
|
||||
* The original position of the model
|
||||
*/
|
||||
NiPoint3 m_OriginalPosition;
|
||||
|
||||
/**
|
||||
* The rotation of the model
|
||||
*/
|
||||
NiQuaternion m_Rotation;
|
||||
/**
|
||||
* The rotation original of the model
|
||||
*/
|
||||
NiQuaternion m_OriginalRotation;
|
||||
|
||||
/**
|
||||
* The ID of the user that made the model
|
||||
*/
|
||||
LWOOBJID m_userModelID;
|
||||
};
|
||||
/**
|
||||
* The ID of the user that made the model
|
||||
*/
|
||||
LWOOBJID m_userModelID;
|
||||
};
|
||||
|
Reference in New Issue
Block a user