feat: debug information (#1915)

This commit is contained in:
David Markowitz
2025-10-19 05:22:45 -07:00
committed by GitHub
parent f3a5f60d81
commit 002aa896d8
11 changed files with 253 additions and 4 deletions

View File

@@ -1,9 +1,14 @@
#include "GhostComponent.h"
#include "Amf3.h"
#include "GameMessages.h"
GhostComponent::GhostComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {
m_GhostReferencePoint = NiPoint3Constant::ZERO;
m_GhostOverridePoint = NiPoint3Constant::ZERO;
m_GhostOverride = false;
RegisterMsg<GameMessages::GetObjectReportInfo>(this, &GhostComponent::MsgGetObjectReportInfo);
}
GhostComponent::~GhostComponent() {
@@ -55,3 +60,12 @@ bool GhostComponent::IsObserved(LWOOBJID id) {
void GhostComponent::GhostEntity(LWOOBJID id) {
m_ObservedEntities.erase(id);
}
bool GhostComponent::MsgGetObjectReportInfo(GameMessages::GameMsg& msg) {
auto& reportMsg = static_cast<GameMessages::GetObjectReportInfo&>(msg);
auto& cmptType = reportMsg.info->PushDebug("Ghost");
cmptType.PushDebug<AMFIntValue>("Component ID") = GetComponentID();
cmptType.PushDebug<AMFBoolValue>("Is GM Invis") = false;
return true;
}