mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-05 23:22:03 +00:00
woirking
This commit is contained in:
@@ -71,7 +71,10 @@ ControllablePhysicsComponent::~ControllablePhysicsComponent() {
|
||||
}
|
||||
|
||||
void ControllablePhysicsComponent::Update(float deltaTime) {
|
||||
|
||||
if (m_Velocity == NiPoint3::ZERO) return;
|
||||
m_Position += m_Velocity * deltaTime;
|
||||
m_DirtyPosition = true;
|
||||
Game::entityManager->SerializeEntity(m_Parent);
|
||||
}
|
||||
|
||||
void ControllablePhysicsComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
|
||||
@@ -153,6 +156,7 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream* outBitStream, bo
|
||||
}
|
||||
|
||||
outBitStream->Write0();
|
||||
if (!bIsInitialUpdate) m_DirtyPosition = false;
|
||||
}
|
||||
|
||||
if (!bIsInitialUpdate) {
|
||||
|
||||
Reference in New Issue
Block a user