diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-07-25 11:38:01 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-25 11:38:01 +0300 |
| commit | 3330a4adb8a73cd51a774212c92ebec6c482b665 (patch) | |
| tree | 45693ed8091481d8b3e516f180bdb1a5e3b4835b /indra/newview/llphysicsmotion.cpp | |
| parent | 2fa69bc13e8c629f1e3dd5eafa3dd07c83dbb4ae (diff) | |
| parent | 4b543b618b101aca9dee1f224d8dbd4fbf937d71 (diff) | |
Merge pull request #2105 from RyeMutt/button-image-warning
Fix warning from misnamed button image name reference
Diffstat (limited to 'indra/newview/llphysicsmotion.cpp')
| -rw-r--r-- | indra/newview/llphysicsmotion.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 6782aa2123..86291708b0 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -454,25 +454,26 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - // Skip if disabled globally. - if (!gSavedSettings.getBOOL("AvatarPhysics")) - { - return true; - } + // Skip if disabled globally. + static LLCachedControl<bool> av_physics(gSavedSettings, "AvatarPhysics"); + if (!av_physics) + { + return true; + } - bool update_visuals = false; - for (motion_vec_t::iterator iter = mMotions.begin(); - iter != mMotions.end(); - ++iter) - { - LLPhysicsMotion *motion = (*iter); - update_visuals |= motion->onUpdate(time); - } + bool update_visuals = false; + for (motion_vec_t::iterator iter = mMotions.begin(); + iter != mMotions.end(); + ++iter) + { + LLPhysicsMotion *motion = (*iter); + update_visuals |= motion->onUpdate(time); + } - if (update_visuals) - mCharacter->updateVisualParams(); + if (update_visuals) + mCharacter->updateVisualParams(); - return true; + return true; } // Return true if character has to update visual params. |
