From cf8332d3fdc8d21b0cbb55b55f6f85b4d81fd155 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Sun, 10 Mar 2024 01:50:33 -0800 Subject: [PATCH] Update ControllablePhysicsComponent.cpp --- dGame/dComponents/ControllablePhysicsComponent.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dGame/dComponents/ControllablePhysicsComponent.cpp b/dGame/dComponents/ControllablePhysicsComponent.cpp index 5aa6ad18..398b5cd7 100644 --- a/dGame/dComponents/ControllablePhysicsComponent.cpp +++ b/dGame/dComponents/ControllablePhysicsComponent.cpp @@ -105,6 +105,7 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream& outBitStream, bo if (m_DirtyEquippedItemInfo || bIsInitialUpdate) { outBitStream.Write(m_PickupRadius); outBitStream.Write(m_InJetpackMode); + if (!bIsInitialUpdate) m_DirtyEquippedItemInfo = false; } @@ -115,12 +116,10 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream& outBitStream, bo outBitStream.Write(m_BubbleType); outBitStream.Write(m_SpecialAnims); } + if (!bIsInitialUpdate) m_DirtyBubble = false; } - - bool isVelocityZero = m_Velocity != NiPoint3Constant::ZERO; - bool isAngularVelocityZero = m_AngularVelocity != NiPoint3Constant::ZERO; - bool shouldWriteFrameStats = m_DirtyPosition || bIsInitialUpdate || isVelocityZero || isAngularVelocityZero; + outBitStream.Write(m_DirtyPosition || bIsInitialUpdate); if (m_DirtyPosition || bIsInitialUpdate) { outBitStream.Write(m_Position.x);