mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 10:14:06 +00:00
chore: rename VehiclePhysics to HavokVehiclePhysics (#1331)
since that is it's true name and there's another VehiclePhysics component that is simply named that
This commit is contained in:
@@ -43,7 +43,7 @@ set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp"
|
||||
"SoundTriggerComponent.cpp"
|
||||
"SwitchComponent.cpp"
|
||||
"TriggerComponent.cpp"
|
||||
"VehiclePhysicsComponent.cpp"
|
||||
"HavokVehiclePhysicsComponent.cpp"
|
||||
"VendorComponent.cpp"
|
||||
"ZoneControlComponent.cpp"
|
||||
PARENT_SCOPE
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include "InventoryComponent.h"
|
||||
#include "ControllablePhysicsComponent.h"
|
||||
#include "EntityManager.h"
|
||||
#include "VehiclePhysicsComponent.h"
|
||||
#include "HavokVehiclePhysicsComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "Item.h"
|
||||
#include "Amf3.h"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "VehiclePhysicsComponent.h"
|
||||
#include "HavokVehiclePhysicsComponent.h"
|
||||
#include "EntityManager.h"
|
||||
|
||||
VehiclePhysicsComponent::VehiclePhysicsComponent(Entity* parent) : PhysicsComponent(parent) {
|
||||
HavokVehiclePhysicsComponent::HavokVehiclePhysicsComponent(Entity* parent) : PhysicsComponent(parent) {
|
||||
m_Velocity = NiPoint3::ZERO;
|
||||
m_AngularVelocity = NiPoint3::ZERO;
|
||||
m_IsOnGround = true;
|
||||
@@ -12,45 +12,45 @@ VehiclePhysicsComponent::VehiclePhysicsComponent(Entity* parent) : PhysicsCompon
|
||||
m_EndBehavior = GeneralUtils::GenerateRandomNumber<uint32_t>(0, 7);
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetVelocity(const NiPoint3& vel) {
|
||||
void HavokVehiclePhysicsComponent::SetVelocity(const NiPoint3& vel) {
|
||||
if (vel == m_Velocity) return;
|
||||
m_DirtyPosition = true;
|
||||
m_Velocity = vel;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetAngularVelocity(const NiPoint3& vel) {
|
||||
void HavokVehiclePhysicsComponent::SetAngularVelocity(const NiPoint3& vel) {
|
||||
if (vel == m_AngularVelocity) return;
|
||||
m_DirtyPosition = true;
|
||||
m_AngularVelocity = vel;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetIsOnGround(bool val) {
|
||||
void HavokVehiclePhysicsComponent::SetIsOnGround(bool val) {
|
||||
if (val == m_IsOnGround) return;
|
||||
m_DirtyPosition = true;
|
||||
m_IsOnGround = val;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetIsOnRail(bool val) {
|
||||
void HavokVehiclePhysicsComponent::SetIsOnRail(bool val) {
|
||||
if (val == m_IsOnRail) return;
|
||||
m_DirtyPosition = true;
|
||||
m_IsOnRail = val;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetRemoteInputInfo(const RemoteInputInfo& remoteInputInfo) {
|
||||
void HavokVehiclePhysicsComponent::SetRemoteInputInfo(const RemoteInputInfo& remoteInputInfo) {
|
||||
if (m_RemoteInputInfo == remoteInputInfo) return;
|
||||
this->m_RemoteInputInfo = remoteInputInfo;
|
||||
m_DirtyRemoteInput = true;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetDirtyVelocity(bool val) {
|
||||
void HavokVehiclePhysicsComponent::SetDirtyVelocity(bool val) {
|
||||
m_DirtyVelocity = val;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::SetDirtyAngularVelocity(bool val) {
|
||||
void HavokVehiclePhysicsComponent::SetDirtyAngularVelocity(bool val) {
|
||||
m_DirtyAngularVelocity = val;
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) {
|
||||
void HavokVehiclePhysicsComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) {
|
||||
outBitStream->Write(bIsInitialUpdate || m_DirtyPosition);
|
||||
|
||||
if (bIsInitialUpdate || m_DirtyPosition) {
|
||||
@@ -111,7 +111,7 @@ void VehiclePhysicsComponent::Serialize(RakNet::BitStream* outBitStream, bool bI
|
||||
outBitStream->Write0();
|
||||
}
|
||||
|
||||
void VehiclePhysicsComponent::Update(float deltaTime) {
|
||||
void HavokVehiclePhysicsComponent::Update(float deltaTime) {
|
||||
if (m_SoftUpdate > 5) {
|
||||
Game::entityManager->SerializeEntity(m_Parent);
|
||||
m_SoftUpdate = 0;
|
@@ -33,11 +33,11 @@ struct RemoteInputInfo {
|
||||
/**
|
||||
* Physics component for vehicles.
|
||||
*/
|
||||
class VehiclePhysicsComponent : public PhysicsComponent {
|
||||
class HavokVehiclePhysicsComponent : public PhysicsComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::VEHICLE_PHYSICS;
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::HAVOK_VEHICLE_PHYSICS;
|
||||
|
||||
VehiclePhysicsComponent(Entity* parentEntity);
|
||||
HavokVehiclePhysicsComponent(Entity* parentEntity);
|
||||
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include "PossessorComponent.h"
|
||||
#include "PossessableComponent.h"
|
||||
#include "ModuleAssemblyComponent.h"
|
||||
#include "VehiclePhysicsComponent.h"
|
||||
#include "HavokVehiclePhysicsComponent.h"
|
||||
#include "CharacterComponent.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "PropertyManagementComponent.h"
|
||||
@@ -981,7 +981,7 @@ void InventoryComponent::HandlePossession(Item* item) {
|
||||
auto* mount = Game::entityManager->CreateEntity(info, nullptr, m_Parent);
|
||||
|
||||
// Check to see if the mount is a vehicle, if so, flip it
|
||||
auto* vehicleComponent = mount->GetComponent<VehiclePhysicsComponent>();
|
||||
auto* vehicleComponent = mount->GetComponent<HavokVehiclePhysicsComponent>();
|
||||
if (vehicleComponent) characterComponent->SetIsRacing(true);
|
||||
|
||||
// Setup the destroyable stats
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include "PossessorComponent.h"
|
||||
#include "eRacingTaskParam.h"
|
||||
#include "Spawner.h"
|
||||
#include "VehiclePhysicsComponent.h"
|
||||
#include "HavokVehiclePhysicsComponent.h"
|
||||
#include "dServer.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "dConfig.h"
|
||||
|
Reference in New Issue
Block a user