summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index be0c763e25..8f703d0035 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1037,22 +1037,26 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb)
{
if (!isExtendedEnvironmentEnabled())
{ /*TODO: When EEP is live on the entire grid, this can go away. */
- if (!cb)
+ if (parcel_id == INVALID_PARCEL_ID)
{
- cb = [this](S32 pid, EnvironmentInfo::ptr_t envinfo)
- {
- if (envinfo->mDayCycle) recordEnvironment(pid, envinfo);
- else
+ if (!cb)
+ {
+ cb = [this](S32 pid, EnvironmentInfo::ptr_t envinfo)
{
- clearEnvironment(ENV_PARCEL);
- setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
- updateEnvironment();
- }
- };
- }
+ if (envinfo->mDayCycle) recordEnvironment(pid, envinfo);
+ else
+ {
+ clearEnvironment(ENV_PARCEL);
+ setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET);
+ updateEnvironment();
+ }
+ };
+ }
- if (parcel_id == INVALID_PARCEL_ID)
LLEnvironmentRequest::initiate(cb);
+ }
+ else if (cb)
+ cb(parcel_id, EnvironmentInfo::ptr_t());
return;
}