mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2025-07-25 04:54:47 +00:00
Use epsilon comparison
This commit is contained in:
@ -312,7 +312,9 @@ foundComponent:
|
||||
|
||||
if (physicsComponent) speed = physicsComponent->speed;
|
||||
|
||||
if (speed == -1.0f) speed = 10.0f;
|
||||
float delta = fabs(speed) - 1.0f;
|
||||
|
||||
if (delta <= std::numeric_limits<float>::epsilon()) speed = 10.0f;
|
||||
|
||||
m_PhysicsSpeedCache[lot] = speed;
|
||||
|
||||
|
Reference in New Issue
Block a user