diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index 278e9106..7acec5f7 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -307,13 +307,14 @@ 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; + + float delta = fabs(speed) - 1.0f; + + if (delta <= std::numeric_limits::epsilon()) speed = 10.0f; m_PhysicsSpeedCache[lot] = speed;