diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2024-04-24 09:43:04 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2024-04-24 09:43:04 -0400 |
| commit | fc71a9c1ed96cb1cb97124e3cceabdfa11e1cc75 (patch) | |
| tree | b8e19975b3acc800aeaf8c541a780dbb84dc1fd3 /indra/newview/llvoavatar.cpp | |
| parent | a3cbd41543258818589dd0e368c68d2dc62b3398 (diff) | |
| parent | 5e40b5e64433b224be4dc220e4496dcd0a43f3f6 (diff) | |
Merge release/maint-yz to main on promotion of secondlife/viewer #736: Maintenance YZ 7.1.6.8745209917
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9579a5e4b1..8ecfa3eed1 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4291,6 +4291,15 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time) if (mTurning) { pelvis_rot_threshold *= 0.4f; + // account for fps, assume that above value is for ~60fps + constexpr F32 default_frame_sec = 0.016f; + F32 prev_frame_sec = LLFrameTimer::getFrameDeltaTimeF32(); + if (default_frame_sec > prev_frame_sec) + { + // reduce threshold since turn rate per second is constant, + // shorter frame means shorter turn. + pelvis_rot_threshold *= prev_frame_sec/default_frame_sec; + } } // am I done turning? |
