feat: proper gminvs with ghosting (#1920)

* feat: proper gminvis ghosting

* address feedback

---------

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
This commit is contained in:
Aaron Kimbrell
2025-11-15 18:43:33 -06:00
committed by GitHub
parent 2fb16420f3
commit 11d44ffb98
9 changed files with 116 additions and 49 deletions

View File

@@ -7,11 +7,17 @@
class NiPoint3;
namespace tinyxml2 {
class XMLDocument;
}
class GhostComponent final : public Component {
public:
static inline const eReplicaComponentType ComponentType = eReplicaComponentType::GHOST;
GhostComponent(Entity* parent, const int32_t componentID);
~GhostComponent() override;
void LoadFromXml(const tinyxml2::XMLDocument& doc) override;
void UpdateXml(tinyxml2::XMLDocument& doc) override;
void SetGhostOverride(bool value) { m_GhostOverride = value; };
@@ -39,9 +45,14 @@ public:
void GhostEntity(const LWOOBJID id);
bool OnToggleGMInvis(GameMessages::GameMsg& msg);
bool OnGetGMInvis(GameMessages::GameMsg& msg);
bool MsgGetObjectReportInfo(GameMessages::GameMsg& msg);
private:
NiPoint3 m_GhostReferencePoint;
NiPoint3 m_GhostOverridePoint;
@@ -51,6 +62,9 @@ private:
std::unordered_set<LWOOBJID> m_LimboConstructions;
bool m_GhostOverride;
bool m_IsGMInvisible;
};
#endif //!__GHOSTCOMPONENT__H__