From db28075a8db2f1eff8f318688e57ae0c76931508 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 31 Aug 2010 18:06:03 -0400 Subject: Added debug setting for profiling. --- indra/newview/app_settings/settings.xml | 13 ++++++++++++- indra/newview/llbreastmotion.cpp | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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 @@ AvatarPhysics Comment - Enable avatar physics, such as breast physics. + Enable avatar physics. Persist 1 Type @@ -618,6 +618,17 @@ Value 1 + AvatarPhysicsTest + + Comment + Simulate continuous physics behavior on all nearby avatars. + Persist + 1 + Type + Boolean + Value + 0 + AvatarSex Comment 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); -- cgit v1.2.3