mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-05-30 03:14:20 +00:00
feat: make gm registration simpler and safer (#1932)
* gm registration re-work * fix errors Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * remove duplicate message * Remove duplicate function * add null check --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "Amf3.h"
|
||||
|
||||
RigidbodyPhantomPhysicsComponent::RigidbodyPhantomPhysicsComponent(Entity* parent, const int32_t componentID) : PhysicsComponent(parent, componentID) {
|
||||
RegisterMsg(MessageType::Game::GET_OBJECT_REPORT_INFO, this, &RigidbodyPhantomPhysicsComponent::OnGetObjectReportInfo);
|
||||
RegisterMsg(&RigidbodyPhantomPhysicsComponent::OnGetObjectReportInfo);
|
||||
|
||||
m_Position = m_Parent->GetDefaultPosition();
|
||||
m_Rotation = m_Parent->GetDefaultRotation();
|
||||
@@ -59,9 +59,8 @@ void RigidbodyPhantomPhysicsComponent::SpawnVertices() const {
|
||||
PhysicsComponent::SpawnVertices(m_dpEntity);
|
||||
}
|
||||
|
||||
bool RigidbodyPhantomPhysicsComponent::OnGetObjectReportInfo(GameMessages::GameMsg& msg) {
|
||||
PhysicsComponent::OnGetObjectReportInfo(msg);
|
||||
auto& reportInfo = static_cast<GameMessages::GetObjectReportInfo&>(msg);
|
||||
bool RigidbodyPhantomPhysicsComponent::OnGetObjectReportInfo(GameMessages::GetObjectReportInfo& reportInfo) {
|
||||
PhysicsComponent::OnGetObjectReportInfo(reportInfo);
|
||||
auto& info = reportInfo.subCategory->PushDebug("Rigidbody Phantom Info");
|
||||
info.PushDebug<AMFDoubleValue>("Scale") = m_Scale;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user