2024-01-12 19:18:28 +00:00
|
|
|
#ifndef __GHOSTCOMPONENT__H__
|
|
|
|
#define __GHOSTCOMPONENT__H__
|
|
|
|
|
|
|
|
#include "Component.h"
|
|
|
|
#include "eReplicaComponentType.h"
|
2024-01-14 19:10:13 +00:00
|
|
|
#include <unordered_set>
|
|
|
|
|
|
|
|
class NiPoint3;
|
2024-01-12 19:18:28 +00:00
|
|
|
|
2024-01-24 05:13:23 +00:00
|
|
|
class GhostComponent final : public Component {
|
2024-01-12 19:18:28 +00:00
|
|
|
public:
|
|
|
|
static inline const eReplicaComponentType ComponentType = eReplicaComponentType::GHOST;
|
|
|
|
GhostComponent(Entity* parent);
|
2024-01-14 19:10:13 +00:00
|
|
|
~GhostComponent() override;
|
|
|
|
|
|
|
|
void SetGhostOverride(bool value) { m_GhostOverride = value; };
|
|
|
|
|
|
|
|
const NiPoint3& GetGhostReferencePoint() const { return m_GhostOverride ? m_GhostOverridePoint : m_GhostReferencePoint; };
|
|
|
|
|
|
|
|
const NiPoint3& GetOriginGhostReferencePoint() const { return m_GhostReferencePoint; };
|
|
|
|
|
|
|
|
const NiPoint3& GetGhostOverridePoint() const { return m_GhostOverridePoint; };
|
|
|
|
|
|
|
|
bool GetGhostOverride() const { return m_GhostOverride; };
|
|
|
|
|
|
|
|
void SetGhostReferencePoint(const NiPoint3& value);
|
|
|
|
|
|
|
|
void SetGhostOverridePoint(const NiPoint3& value);
|
|
|
|
|
|
|
|
void AddLimboConstruction(const LWOOBJID objectId);
|
|
|
|
|
|
|
|
void RemoveLimboConstruction(const LWOOBJID objectId);
|
|
|
|
|
|
|
|
void ConstructLimboEntities();
|
|
|
|
|
2024-02-11 20:28:25 +00:00
|
|
|
void ObserveEntity(const LWOOBJID id);
|
2024-01-14 19:10:13 +00:00
|
|
|
|
2024-02-11 20:28:25 +00:00
|
|
|
bool IsObserved(const LWOOBJID id);
|
2024-01-14 19:10:13 +00:00
|
|
|
|
2024-02-11 20:28:25 +00:00
|
|
|
void GhostEntity(const LWOOBJID id);
|
2024-01-14 19:10:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
NiPoint3 m_GhostReferencePoint;
|
|
|
|
|
|
|
|
NiPoint3 m_GhostOverridePoint;
|
|
|
|
|
2024-02-11 20:28:25 +00:00
|
|
|
std::unordered_set<LWOOBJID> m_ObservedEntities;
|
2024-01-14 19:10:13 +00:00
|
|
|
|
|
|
|
std::unordered_set<LWOOBJID> m_LimboConstructions;
|
|
|
|
|
|
|
|
bool m_GhostOverride;
|
2024-01-12 19:18:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //!__GHOSTCOMPONENT__H__
|