summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index ed529975d2..d263e15a10 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1483,6 +1483,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
BOOL region_deny_transacted_override = false; // Deprecated
BOOL region_deny_age_unverified_override = false;
BOOL region_allow_access_override = true;
+ BOOL region_allow_environment_override = true;
+ S32 parcel_environment_version = 0;
BOOL agent_parcel_update = false; // updating previous(existing) agent parcel
S32 other_clean_time = 0;
@@ -1573,6 +1575,12 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
msg->getBOOLFast(_PREHASH_RegionAllowAccessBlock, _PREHASH_RegionAllowAccessOverride, region_allow_access_override);
}
+ if (msg->getNumberOfBlocks(_PREHASH_ParcelEnvironmentBlock))
+ {
+ msg->getS32Fast(_PREHASH_ParcelEnvironmentBlock, _PREHASH_ParcelEnvironmentVersion, parcel_environment_version);
+ msg->getBOOLFast(_PREHASH_ParcelEnvironmentBlock, _PREHASH_RegionAllowEnvironmentOverride, region_allow_environment_override);
+ }
+
msg->getS32("ParcelData", "OtherCleanTime", other_clean_time );
// Actually extract the data.
@@ -1590,6 +1598,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
}
+ bool environment_changed = (parcel->getParcelEnvironmentVersion() != parcel_environment_version);
+
parcel->init(owner_id,
FALSE, FALSE, FALSE,
claim_date, claim_price_per_meter, rent_price_per_meter,
@@ -1615,6 +1625,10 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
parcel->setRegionDenyAnonymousOverride(region_deny_anonymous_override);
parcel->setRegionDenyAgeUnverifiedOverride(region_deny_age_unverified_override);
parcel->setRegionAllowAccessOverride(region_allow_access_override);
+
+ parcel->setParcelEnvironmentVersion(parcel_environment_version);
+ parcel->setRegionAllowEnvironmentOverride(region_allow_environment_override);
+
parcel->unpackMessage(msg);
if (parcel == parcel_mgr.mAgentParcel)
@@ -1632,9 +1646,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
// Let interesting parties know about agent parcel change.
LLViewerParcelMgr* instance = LLViewerParcelMgr::getInstance();
- // Notify anything that wants to know when the agent changes parcels
- gAgent.changeParcels();
-
if (instance->mTeleportInProgress)
{
instance->mTeleportInProgress = FALSE;
@@ -1648,12 +1659,21 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false);
}
}
- }
- else if (agent_parcel_update)
- {
- // updated agent parcel
- parcel_mgr.mAgentParcel->unpackMessage(msg);
- }
+
+ LL_WARNS("LAPRAS") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
+ // Notify anything that wants to know when the agent changes parcels
+ gAgent.changeParcels();
+ }
+ else if (agent_parcel_update)
+ {
+ // updated agent parcel
+ parcel_mgr.mAgentParcel->unpackMessage(msg);
+ if ((LLEnvironment::instance().isExtendedEnvironmentEnabled() && environment_changed))
+ {
+ LL_WARNS("LAPRAS") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
+ LLEnvironment::instance().requestParcel(local_id);
+ }
+ }
}
// Handle updating selections, if necessary.
@@ -1835,26 +1855,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}//if gAudiop
};
- if (LLEnvironment::instance().isExtendedEnvironmentEnabled())
- {
- LL_WARNS("LAPRAS") << "TODO: Hey Rider! Fix this. 1) don't rerequest parcel information. 2) if sequent_id == -1 we are selecting a parcel. Deal with that correctly." << LL_ENDL;
-
- if (sequence_id == SELECTED_PARCEL_SEQ_ID)
- {
- LL_WARNS("LAPRAS") << "TODO: Hay Rider! Fix this. Get environment for selected parcel." << LL_ENDL;
- }
- else if ((sequence_id == HOVERED_PARCEL_SEQ_ID) ||
- (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID) ||
- (sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID) ||
- (sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID))
- {
- /*NoOp*/
- }
- else
- {
- LLEnvironment::instance().requestParcel(local_id);
- }
- }
}
void LLViewerParcelMgr::optionally_start_music(const std::string& music_url)