mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 10:45:27 +00:00
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:
@@ -14,6 +14,7 @@
|
|||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "StringifiedEnum.h"
|
#include "StringifiedEnum.h"
|
||||||
#include "Amf3.h"
|
#include "Amf3.h"
|
||||||
|
#include "GameMessages.h"
|
||||||
#include "ObjectLoadState.h"
|
#include "ObjectLoadState.h"
|
||||||
#include "PhantomPhysicsComponent.h"
|
#include "PhantomPhysicsComponent.h"
|
||||||
|
|
||||||
@@ -113,3 +114,16 @@ void SimplePhysicsComponent::Allocator(Entity& entity, ObjectLoadState& state) {
|
|||||||
else entity.AddComponent<SimplePhysicsComponent>(simplePhysicsComponentID);
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -363,3 +363,9 @@ const Path* Zone::GetPath(std::string name) const {
|
|||||||
|
|
||||||
return nullptr;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user