mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 15:37:20 +00:00
Use epsilon comparison
This commit is contained in:
parent
47445ada54
commit
308d56968a
@ -312,7 +312,9 @@ foundComponent:
|
|||||||
|
|
||||||
if (physicsComponent) speed = physicsComponent->speed;
|
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;
|
m_PhysicsSpeedCache[lot] = speed;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user