diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-08-31 18:06:03 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-08-31 18:06:03 -0400 |
commit | db28075a8db2f1eff8f318688e57ae0c76931508 (patch) | |
tree | 93f0be2eb99b204d350f3d3abb576d9e487e8761 | |
parent | 9039af33723382058cd422a360cda535c28ebc84 (diff) |
Added debug setting for profiling.
-rw-r--r-- | indra/newview/app_settings/settings.xml | 13 | ||||
-rw-r--r-- | indra/newview/llbreastmotion.cpp | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ecb36273ec..58ed998ba0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -610,7 +610,7 @@ <key>AvatarPhysics</key> <map> <key>Comment</key> - <string>Enable avatar physics, such as breast physics.</string> + <string>Enable avatar physics.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -618,6 +618,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>AvatarPhysicsTest</key> + <map> + <key>Comment</key> + <string>Simulate continuous physics behavior on all nearby avatars.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>AvatarSex</key> <map> <key>Comment</key> diff --git a/indra/newview/llbreastmotion.cpp b/indra/newview/llbreastmotion.cpp index b38e818dbd..57dc169ff3 100644 --- a/indra/newview/llbreastmotion.cpp +++ b/indra/newview/llbreastmotion.cpp @@ -325,6 +325,12 @@ BOOL LLBreastMotion::onUpdate(F32 time, U8* joint_mask) mBreastVelocity_local_vec += acceleration_local_vec; mBreastVelocity_local_vec.clamp(-mBreastMaxVelocityParam*100.0, mBreastMaxVelocityParam*100.0); + // Temporary debugging setting to cause all avatars to move, for profiling purposes. + if (gSavedSettings.getBOOL("AvatarPhysicsTest")) + { + mBreastVelocity_local_vec[0] = sin(mTimer.getElapsedTimeF32()*4.0)*5.0; + mBreastVelocity_local_vec[1] = sin(mTimer.getElapsedTimeF32()*3.0)*5.0; + } // Calculate the new parameters and clamp them to the min/max ranges. LLVector3 new_local_pt = breast_current_local_pt + mBreastVelocity_local_vec*time_delta; new_local_pt.clamp(mBreastParamsMin,mBreastParamsMax); |