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 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 11:37:31 -06:00
parent b2dbaeb0ab
commit 6ac2faf55a
2 changed files with 20 additions and 0 deletions

View File

@@ -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<SimplePhysicsComponent>(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;
}

View File

@@ -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;
}