things switched, just gotta move the handle's

This commit is contained in:
Aronwk
2025-05-16 18:17:28 -05:00
parent 47015fda08
commit 5628664060
10 changed files with 179 additions and 179 deletions

View File

@@ -23,9 +23,9 @@
#include "eMissionTaskType.h"
#include "eTriggerEventType.h"
#include "eObjectBits.h"
#include "PositionUpdate.h"
#include "MessageType/Chat.h"
#include "PlayerManager.h"
#include "WorldPackets.h"
//Component includes:
#include "Component.h"
@@ -99,7 +99,7 @@
#include <ranges>
Observable<Entity*, const PositionUpdate&> Entity::OnPlayerPositionUpdate;
Observable<Entity*, const WorldPackets::PositionUpdate&> Entity::OnPlayerPositionUpdate;
Entity::Entity(const LWOOBJID& objectID, EntityInfo info, User* parentUser, Entity* parentEntity) {
m_ObjectID = objectID;
@@ -2112,7 +2112,7 @@ uint8_t Entity::GetCollectibleID() const {
return collectible ? collectible->GetCollectibleId() : 0;
}
void Entity::ProcessPositionUpdate(PositionUpdate& update) {
void Entity::ProcessPositionUpdate(WorldPackets::PositionUpdate& update) {
if (!IsPlayer()) return;
auto* controllablePhysicsComponent = GetComponent<ControllablePhysicsComponent>();
if (!controllablePhysicsComponent) return;

View File

@@ -20,6 +20,9 @@ namespace GameMessages {
struct ChildLoaded;
struct PlayerResurrectionFinished;
};
namespace WorldPackets {
struct PositionUpdate;
};
namespace MessageType {
enum class Game : uint16_t;
@@ -316,7 +319,7 @@ public:
Entity* GetScheduledKiller() { return m_ScheduleKiller; }
void ProcessPositionUpdate(PositionUpdate& update);
void ProcessPositionUpdate(WorldPackets::PositionUpdate& update);
// Scale will only be communicated to the client when the construction packet is sent
void SetScale(const float scale) { m_Scale = scale; };
@@ -328,7 +331,7 @@ public:
/**
* @brief The observable for player entity position updates.
*/
static Observable<Entity*, const PositionUpdate&> OnPlayerPositionUpdate;
static Observable<Entity*, const WorldPackets::PositionUpdate&> OnPlayerPositionUpdate;
protected:
LWOOBJID m_ObjectID;

View File

@@ -34,7 +34,7 @@ void HavokVehiclePhysicsComponent::SetIsOnRail(bool val) {
m_IsOnRail = val;
}
void HavokVehiclePhysicsComponent::SetRemoteInputInfo(const RemoteInputInfo& remoteInputInfo) {
void HavokVehiclePhysicsComponent::SetRemoteInputInfo(const WorldPackets::PositionUpdate::RemoteInputInfo& remoteInputInfo) {
if (remoteInputInfo == m_RemoteInputInfo) return;
this->m_RemoteInputInfo = remoteInputInfo;
m_DirtyPosition = true;

View File

@@ -4,7 +4,7 @@
#include "Entity.h"
#include "PhysicsComponent.h"
#include "eReplicaComponentType.h"
#include "PositionUpdate.h"
#include "WorldPackets.h"
/**
* Physics component for vehicles.
@@ -65,7 +65,7 @@ public:
*/
const bool GetIsOnRail() const { return m_IsOnRail; }
void SetRemoteInputInfo(const RemoteInputInfo&);
void SetRemoteInputInfo(const WorldPackets::PositionUpdate::RemoteInputInfo& remoteInputInfo);
private:
NiPoint3 m_Velocity;
@@ -76,5 +76,5 @@ private:
float m_SoftUpdate = 0;
uint32_t m_EndBehavior;
RemoteInputInfo m_RemoteInputInfo;
WorldPackets::PositionUpdate::RemoteInputInfo m_RemoteInputInfo;
};