mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 07:27:18 +00:00
2cc13c6499
* Make serialize actually virtual * fix serialize and make update virutal * Update VendorComponent.h * Remove flag var * Update SoundTriggerComponent.h --------- Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
#pragma once
|
|
#include "dCommonVars.h"
|
|
#include "RakNetTypes.h"
|
|
#include "NiPoint3.h"
|
|
#include "NiQuaternion.h"
|
|
#include "Component.h"
|
|
#include "eReplicaComponentType.h"
|
|
|
|
class Entity;
|
|
|
|
/**
|
|
* Component that represents entities that are a model, e.g. collectible models and BBB models.
|
|
*/
|
|
class ModelComponent : public Component {
|
|
public:
|
|
static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL;
|
|
|
|
ModelComponent(Entity* parent);
|
|
|
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
|
|
|
/**
|
|
* Returns the original position of the model
|
|
* @return the original position of the model
|
|
*/
|
|
const NiPoint3& GetPosition() { return m_OriginalPosition; }
|
|
|
|
/**
|
|
* Sets the original position of the model
|
|
* @param pos the original position to set
|
|
*/
|
|
void SetPosition(const NiPoint3& pos) { m_OriginalPosition = pos; }
|
|
|
|
/**
|
|
* Returns the original rotation of the model
|
|
* @return the original rotation of the model
|
|
*/
|
|
const NiQuaternion& GetRotation() { return m_OriginalRotation; }
|
|
|
|
/**
|
|
* Sets the original rotation of the model
|
|
* @param rot the original rotation to set
|
|
*/
|
|
void SetRotation(const NiQuaternion& rot) { m_OriginalRotation = rot; }
|
|
|
|
private:
|
|
|
|
/**
|
|
* The original position of the model
|
|
*/
|
|
NiPoint3 m_OriginalPosition;
|
|
|
|
/**
|
|
* The rotation original of the model
|
|
*/
|
|
NiQuaternion m_OriginalRotation;
|
|
|
|
/**
|
|
* The ID of the user that made the model
|
|
*/
|
|
LWOOBJID m_userModelID;
|
|
};
|