summaryrefslogtreecommitdiff
path: root/indra/newview/llphysicsmotion.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-03-29 20:57:17 -0400
committerLoren Shih <seraph@lindenlab.com>2011-03-29 20:57:17 -0400
commit3208104e2e51124fb6ee90133fee328f59e1fddc (patch)
treeb3b8d9e46bf63c88d465da8f1cd9dac551d05626 /indra/newview/llphysicsmotion.cpp
parent45a43256ae71ec7936fc73e3b9c41470a23dd229 (diff)
A bit of rearchitecture so that we can have edit wearables that don't have associated snapshots. Needed to support physics wearables, which don't use a snapshot.
Diffstat (limited to 'indra/newview/llphysicsmotion.cpp')
-rw-r--r--indra/newview/llphysicsmotion.cpp14
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) ?