From 47445ada54570d6599af1b1b79550b9fd3ff2b4f Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Mon, 27 Mar 2023 01:13:34 -0700 Subject: [PATCH] Fix Wingreaper birds not moving Fix an issue where the Wingreaper birds no longer moved. The client seems to do the following: Default speed set to 10.0f Check the PhysicsComponent table for the column speed and if it exists set speed to that value and if the value was null set it to the default again. --- dGame/dComponents/MovementAIComponent.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index 278e9106..3db76bee 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -307,13 +307,12 @@ float MovementAIComponent::GetBaseSpeed(LOT lot) { foundComponent: - float speed; + // Client defaults speed to 10 and if the speed is also null in the table, it defaults to 10. + float speed = 10.0f; - if (physicsComponent == nullptr) { - speed = 8; - } else { - speed = physicsComponent->speed; - } + if (physicsComponent) speed = physicsComponent->speed; + + if (speed == -1.0f) speed = 10.0f; m_PhysicsSpeedCache[lot] = speed;