summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-24 19:48:25 +0300
committerGitHub <noreply@github.com>2024-04-24 19:48:25 +0300
commit1bcc4e7f709bf7067121b5891f3f7db3b99235a0 (patch)
treebc9cea56b8e236f52df392084552018c387cff2c /indra/newview/llvoavatar.cpp
parent09454c53a48e88a9cdd54f68ac507694a766b213 (diff)
parent428f21cf795f440f69a772b314f877ea0c6d4741 (diff)
Merge pull request #1313 from secondlife/marchcat/x-merge
Release (Maint YZ) -> Maint X merge
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 957ce32302..e35c090a96 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?