Merge pull request #1032 from EmosewaMC/FixWingreaper

Fix Wingreaper birds not moving
This commit is contained in:
Gie "Max" Vanommeslaeghe 2023-05-13 14:04:37 +02:00 committed by GitHub
commit 61ae619886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,13 +307,14 @@ float MovementAIComponent::GetBaseSpeed(LOT lot) {
foundComponent: 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) { if (physicsComponent) speed = physicsComponent->speed;
speed = 8;
} else { float delta = fabs(speed) - 1.0f;
speed = physicsComponent->speed;
} if (delta <= std::numeric_limits<float>::epsilon()) speed = 10.0f;
m_PhysicsSpeedCache[lot] = speed; m_PhysicsSpeedCache[lot] = speed;