summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-03-31 15:41:01 -0400
committerLoren Shih <seraph@lindenlab.com>2011-03-31 15:41:01 -0400
commit107ca5d7c8f7a511e6606a91930b893edbfe884e (patch)
tree0997d2b247b676eac9c26c9a7e6435f10759841b
parentf18c2b6dd80f6240478902fdb81d3ae1eb8e21b5 (diff)
Simple fix for out-of-bounds parameter issues.
-rw-r--r--indra/newview/llphysicsmotion.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index e6fe6fe924..157d13e1a4 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -482,12 +482,13 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
F32 behavior_maxspeed = getParamValue("MaxSpeed");
if (physics_test)
behavior_maxspeed = 100.0f;
- /*
+
if (behavior_maxspeed == 0)
return FALSE;
- */
- F32 position_current_local = mPosition_local; // Normalized [0,1] range
+ F32 position_current_local = llclamp(mPosition_local,
+ 0.0f,
+ 1.0f); // Normalized [0,1] range
// Normalize the param position to be from [0,1].
// We have to use normalized values because there may be more than one driven param,