diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-29 22:29:57 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-29 22:29:57 -0400 |
commit | 67316ada5a51e1dc1e4d40a805312dddaa653ae2 (patch) | |
tree | aabca14948c8282875426372e0ca4b017c1a927d /indra/newview/llphysicsmotion.cpp | |
parent | 77cd2e283a18f2e4bf71aeacb0938ed69a5a981d (diff) | |
parent | 92802e69509824f1d3dca212726373fd9d799104 (diff) |
merged latest improvements from seraph
Diffstat (limited to 'indra/newview/llphysicsmotion.cpp')
-rw-r--r-- | indra/newview/llphysicsmotion.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 48e632280e..4048c66262 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -448,8 +448,16 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 behavior_spring = getParamValue("Spring");
const F32 behavior_gain = getParamValue("Gain");
const F32 behavior_damping = getParamValue("Damping");
- const F32 behavior_maxspeed = getParamValue("MaxSpeed");
const F32 behavior_drag = getParamValue("Drag");
+ const BOOL physics_test = gSavedSettings.getBOOL("AvatarPhysicsTest");
+
+ 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
@@ -526,9 +534,9 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) -behavior_maxspeed, behavior_maxspeed);
// Temporary debugging setting to cause all avatars to move, for profiling purposes.
- if (gSavedSettings.getBOOL("AvatarPhysicsTest"))
+ if (physics_test)
{
- velocity_new_local = sin(time*4.0)*5.0;
+ velocity_new_local = sin(time*4.0);
}
// Calculate the new parameters, or remain unchanged if max speed is 0.
const F32 position_new_local = (behavior_maxspeed != 0) ?
|