mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
Merge pull request #1032 from EmosewaMC/FixWingreaper
Fix Wingreaper birds not moving
This commit is contained in:
commit
61ae619886
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user