diff options
author | Dave Parks <davep@lindenlab.com> | 2023-04-12 09:55:00 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-04-12 09:55:00 -0500 |
commit | 086da3d6f8be0fd1e35fc7fc4438d832187c0b5e (patch) | |
tree | 7a07e661d72be153412bce9bdaa233541860f0a5 /indra/newview/llenvironment.cpp | |
parent | 17615dd6b67f1ca019a44664318550240d289372 (diff) |
DRTVWR-559 Make cloud pattern deterministic when cloud scroll is zero.
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r-- | indra/newview/llenvironment.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 9fe8b00071..51e5aae6de 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1687,8 +1687,16 @@ void LLEnvironment::updateCloudScroll() if (mCurrentEnvironment->getSky() && !mCloudScrollPaused) { - LLVector2 cloud_delta = static_cast<F32>(delta_t)* (mCurrentEnvironment->getSky()->getCloudScrollRate()) / 100.0; - mCloudScrollDelta += cloud_delta; + LLVector2 rate = mCurrentEnvironment->getSky()->getCloudScrollRate(); + if (rate.isExactlyZero()) + { + mCloudScrollDelta.setZero(); + } + else + { + LLVector2 cloud_delta = static_cast<F32>(delta_t) * (mCurrentEnvironment->getSky()->getCloudScrollRate()) / 100.0; + mCloudScrollDelta += cloud_delta; + } } } |