diff options
Diffstat (limited to 'indra/newview/llphysicsmotion.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llphysicsmotion.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index cb6989c9dd..ea10d03264 100644..100755 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -166,7 +166,7 @@ protected: } - void setParamValue(LLViewerVisualParam *param, + void setParamValue(const LLViewerVisualParam *param, const F32 new_value_local, F32 behavior_maxeffect); @@ -224,7 +224,7 @@ BOOL LLPhysicsMotion::initialize() mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); if (mParamDriver == NULL) { - llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl; + LL_INFOS() << "Failure reading in [ " << mParamDriverName << " ]" << LL_ENDL; return FALSE; } @@ -430,7 +430,6 @@ F32 LLPhysicsMotion::calculateVelocity_local() const F32 world_to_model_scale = 100.0f; LLJoint *joint = mJointState->getJoint(); const LLVector3 position_world = joint->getWorldPosition(); - const LLQuaternion rotation_world = joint->getWorldRotation(); const LLVector3 last_position_world = mPosition_world; const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale; const LLVector3 velocity_world = positionchange_world; @@ -669,16 +668,12 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) { - mCharacter->setVisualParamWeight(driver_param, - 0, - FALSE); + mCharacter->setVisualParamWeight(driver_param, 0); } - for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); - iter != driver_param->mDriven.end(); - ++iter) + S32 num_driven = driver_param->getDrivenParamsCount(); + for (S32 i = 0; i < num_driven; ++i) { - LLDrivenEntry &entry = (*iter); - LLViewerVisualParam *driven_param = entry.mParam; + const LLViewerVisualParam *driven_param = driver_param->getDrivenParam(i); setParamValue(driven_param,position_new_local_clamped, behavior_maxeffect); } } @@ -758,7 +753,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) } // Range of new_value_local is assumed to be [0 , 1] normalized. -void LLPhysicsMotion::setParamValue(LLViewerVisualParam *param, +void LLPhysicsMotion::setParamValue(const LLViewerVisualParam *param, F32 new_value_normalized, F32 behavior_maxeffect) { @@ -773,7 +768,5 @@ void LLPhysicsMotion::setParamValue(LLViewerVisualParam *param, // Scale from [0,1] to [value_min_local,value_max_local] const F32 new_value_local = value_min_local + (value_max_local-value_min_local) * new_value_rescaled; - mCharacter->setVisualParamWeight(param, - new_value_local, - FALSE); + mCharacter->setVisualParamWeight(param, new_value_local); } |