diff --git a/dGame/dComponents/VehiclePhysicsComponent.cpp b/dGame/dComponents/VehiclePhysicsComponent.cpp index bf6a3bb7..d981acf7 100644 --- a/dGame/dComponents/VehiclePhysicsComponent.cpp +++ b/dGame/dComponents/VehiclePhysicsComponent.cpp @@ -11,6 +11,7 @@ VehiclePhysicsComponent::VehiclePhysicsComponent(Entity* parent) : Component(par m_DirtyPosition = true; m_DirtyVelocity = true; m_DirtyAngularVelocity = true; + m_EndBehavior = GeneralUtils::GenerateRandomNumber(0, 7); } VehiclePhysicsComponent::~VehiclePhysicsComponent() { @@ -93,7 +94,7 @@ void VehiclePhysicsComponent::Serialize(RakNet::BitStream* outBitStream, bool bI } if (bIsInitialUpdate) { - outBitStream->Write(5); + outBitStream->Write(m_EndBehavior); outBitStream->Write1(); } diff --git a/dGame/dComponents/VehiclePhysicsComponent.h b/dGame/dComponents/VehiclePhysicsComponent.h index 551cce42..64609edf 100644 --- a/dGame/dComponents/VehiclePhysicsComponent.h +++ b/dGame/dComponents/VehiclePhysicsComponent.h @@ -109,4 +109,5 @@ private: bool m_IsOnRail; float m_SoftUpdate = 0; + uint32_t m_EndBehavior; };