summaryrefslogtreecommitdiff
path: root/indra/newview/llphysicsmotion.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-04-17 23:57:00 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-04-17 23:57:00 +0300
commit082c9158b2ad961b747ca6a7bd55bc2a79f27b6a (patch)
tree39200c1ff454ae23c8fd5b76e4c891d26f92c32c /indra/newview/llphysicsmotion.cpp
parent06a76eda6af9fbe36e40a749c44e590ad6cfe363 (diff)
parentc7ebde4ec9d3909c3c2f6503dc9096406297f26d (diff)
Merge branch 'develop' into marchcat/05-develop
# Conflicts: # indra/llmath/v2math.cpp # indra/llmath/v2math.h # indra/llmath/v3math.h # indra/llmath/v4math.h
Diffstat (limited to 'indra/newview/llphysicsmotion.cpp')
-rw-r--r--indra/newview/llphysicsmotion.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 86291708b0..e5c84728fe 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -646,18 +646,17 @@ bool LLPhysicsMotion::onUpdate(F32 time)
velocity_new_local = 0;
}
- // Check for NaN values. A NaN value is detected if the variables doesn't equal itself.
- // If NaN, then reset everything.
- if ((mPosition_local != mPosition_local) ||
- (mVelocity_local != mVelocity_local) ||
- (position_new_local != position_new_local))
+ // Check for NaN values. If NaN, then reset everything.
+ if (llisnan(mPosition_local) ||
+ llisnan(mVelocity_local) ||
+ llisnan(position_new_local))
{
- position_new_local = 0;
- mVelocity_local = 0;
- mVelocityJoint_local = 0;
- mAccelerationJoint_local = 0;
- mPosition_local = 0;
- mPosition_world = LLVector3(0,0,0);
+ position_new_local = 0.f;
+ mVelocity_local = 0.f;
+ mVelocityJoint_local = 0.f;
+ mAccelerationJoint_local = 0.f;
+ mPosition_local = 0.f;
+ mPosition_world = LLVector3(0.f,0.f,0.f);
}
const F32 position_new_local_clamped = llclamp(position_new_local,