From 6ac2faf55a9b4cfd4beb0e1dfdeb5836e0d52612 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 10 Nov 2026 11:37:31 -0600 Subject: [PATCH] fix: the scene lookup and the angular velocity handlers main added are defined after the merge Zone::GetScene and SimplePhysicsComponent's Get/SetAngularVelocity handlers were declared and used but their definitions were lost where the merge kept this branch's side of the file. Co-Authored-By: Claude Opus 5.5 --- .../dComponents/Physics/SimplePhysicsComponent.cpp | 14 ++++++++++++++ dZoneManager/Zone.cpp | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/dGame/dComponents/Physics/SimplePhysicsComponent.cpp b/dGame/dComponents/Physics/SimplePhysicsComponent.cpp index df20495fe..a3fb23ae5 100644 --- a/dGame/dComponents/Physics/SimplePhysicsComponent.cpp +++ b/dGame/dComponents/Physics/SimplePhysicsComponent.cpp @@ -14,6 +14,7 @@ #include "Entity.h" #include "StringifiedEnum.h" #include "Amf3.h" +#include "GameMessages.h" #include "ObjectLoadState.h" #include "PhantomPhysicsComponent.h" @@ -113,3 +114,16 @@ void SimplePhysicsComponent::Allocator(Entity& entity, ObjectLoadState& state) { else entity.AddComponent(simplePhysicsComponentID); } } + +bool SimplePhysicsComponent::OnSetAngularVelocity(GameMessages::SetAngularVelocity& setAngVel) { + m_DirtyVelocity |= setAngVel.bForceFlagDirty || (m_AngularVelocity != setAngVel.angVelocity); + m_AngularVelocity = setAngVel.angVelocity; + LOG_DEBUG("Angular velocity is now %f %f %f", m_AngularVelocity.x, m_AngularVelocity.y, m_AngularVelocity.z); + Game::entityManager->SerializeEntity(m_Parent); + return true; +} + +bool SimplePhysicsComponent::OnGetAngularVelocity(GameMessages::GetAngularVelocity& getAngVel) { + getAngVel.angVelocity = m_AngularVelocity; + return true; +} diff --git a/dZoneManager/Zone.cpp b/dZoneManager/Zone.cpp index 5c10adf12..184374417 100644 --- a/dZoneManager/Zone.cpp +++ b/dZoneManager/Zone.cpp @@ -363,3 +363,9 @@ const Path* Zone::GetPath(std::string name) const { return nullptr; } + +const SceneRef* Zone::GetScene(LWOSCENEID sceneID) const { + auto it = m_Scenes.find(sceneID); + if (it != m_Scenes.end()) return &it->second; + return nullptr; +}