diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-02-09 19:02:22 +0200 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-02-09 19:02:22 +0200 | 
| commit | 199f82786e1a19af519afa4713d2cced44c640d8 (patch) | |
| tree | d693ae773d7226ab651a49f7f200a8d5289b1ebb | |
| parent | fff8ab23a82c4a0c644d7bf6b5d1ddcdb875b361 (diff) | |
SL-14675 Position changes shouldn't cause additional blends when environment isn't ready
| -rw-r--r-- | indra/newview/llenvironment.cpp | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index d828bbf59b..b6f120e644 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -2380,6 +2380,15 @@ void LLEnvironment::onAgentPositionHasChanged(const LLVector3 &localpos)          return;      mCurrentTrack = trackno; + +    LLViewerRegion* cur_region = gAgent.getRegion(); +    if (!cur_region || !cur_region->capabilitiesReceived()) +    { +        // Environment not ready, environment will be updated later, don't cause 'blend' yet. +        // But keep mCurrentTrack updated in case we won't get new altitudes for some reason +        return; +    } +      for (S32 env = ENV_LOCAL; env < ENV_DEFAULT; ++env)      {          if (mEnvironments[env]) | 
