summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-05 22:09:54 +0200
committerGitHub <noreply@github.com>2024-02-05 22:09:54 +0200
commit9f0faf5c892bba9703c713a29202a8ac48bfdf8b (patch)
tree8e64e6074c11005fbb1dac606c176e4470de03e4 /indra/newview/llvoavatar.cpp
parentaa52c852d600aa6b2ea17cdd86f53972c95cca4a (diff)
parente3e1672ac40dd4f1f4e458ed09cd7279f0a45fc3 (diff)
Merge pull request #735 from secondlife/marchcat/yz-merge
Merge Maint Z into Maint YZ
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fee00eb6f4..550be30919 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4283,6 +4283,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?