Skip to content
Snippets Groups Projects
Commit 107ca5d7 authored by Loren Shih's avatar Loren Shih
Browse files

Simple fix for out-of-bounds parameter issues.

parent f18c2b6d
No related branches found
No related tags found
No related merge requests found
...@@ -482,12 +482,13 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) ...@@ -482,12 +482,13 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
F32 behavior_maxspeed = getParamValue("MaxSpeed"); F32 behavior_maxspeed = getParamValue("MaxSpeed");
if (physics_test) if (physics_test)
behavior_maxspeed = 100.0f; behavior_maxspeed = 100.0f;
/*
if (behavior_maxspeed == 0) if (behavior_maxspeed == 0)
return FALSE; 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]. // Normalize the param position to be from [0,1].
// We have to use normalized values because there may be more than one driven param, // We have to use normalized values because there may be more than one driven param,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment