diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-15 14:44:52 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-15 14:44:52 +0200 |
commit | 58582fb6212a3ccd8ff2f52a59a398b4041bba79 (patch) | |
tree | 44a5fea328299ac5207493509f18054dd05cb207 | |
parent | 6304186421e5d8203d9892ac0647db05d0de183a (diff) |
SL-10672 Fixed Sun transitioned to image from previous keyframe
-rw-r--r-- | indra/newview/llenvironment.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 18777e53d1..3defe68a0e 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -297,9 +297,18 @@ namespace void onFinishedSpan() { - LLSettingsDay::TrackBound_t next = getBoundingEntries(getAdjustedNow()); + LLSettingsBase::Seconds adjusted_now = getAdjustedNow(); + LLSettingsDay::TrackBound_t next = getBoundingEntries(adjusted_now); LLSettingsBase::Seconds nextspan = getSpanTime(next); + reset((*next.first).second, (*next.second).second, nextspan); + + // Recalculate (reinitialize) position. Because: + // - 'delta' from applyTimeDelta accumulates errors (probably should be fixed/changed to absolute time) + // - freezes and lag can result in reset being called too late, so we need to add missed time + // - occasional time corrections can happen + // - some transition switches can happen outside applyTimeDelta thus causing 'desync' from 'delta' (can be fixed by getting rid of delta) + initializeTarget(adjusted_now); } }; |