SL-14675 Position changes shouldn't cause additional blends when environment isn't ready

meow-7.2.2
Andrey Kleshchev 2021-02-09 19:02:22 +02:00
parent fff8ab23a8
commit 199f82786e
1 changed files with 9 additions and 0 deletions

View File

@ -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])