summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2010-11-18 15:55:53 -0800
committerAndrew Meadows <andrew@lindenlab.com>2010-11-18 15:55:53 -0800
commit424786d8d05093abd816a3decd86aace64816179 (patch)
tree689b5bb532202c448fa9221d12aacfd482a0b14c /indra/newview/llviewerregion.cpp
parent807007649a32c5276f31c5f73d6fade7d059ce07 (diff)
Added viewer-side "object overlaps parcel" check encroachment returnabilty UI
Reviewed with Falcon
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--indra/newview/llviewerregion.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 9790301d11..e693fc65ea 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1495,6 +1495,19 @@ LLSpatialPartition* LLViewerRegion::getSpatialPartition(U32 type)
return NULL;
}
+// the viewer can not yet distinquish between normal- and estate-owned objects
+// so we collapse these two bits and enable the UI if either are set
+const U32 ALLOW_RETURN_ENCROACHING_OBJECT = REGION_FLAGS_ALLOW_RETURN_ENCROACHING_OBJECT
+ | REGION_FLAGS_ALLOW_RETURN_ENCROACHING_ESTATE_OBJECT;
+
+bool LLViewerRegion::objectIsReturnable(const LLVector3& pos, const LLBBox& bbox)
+{
+ return mParcelOverlay
+ && ( mParcelOverlay->isOwned(pos)
+ || ((mRegionFlags & ALLOW_RETURN_ENCROACHING_OBJECT)
+ && mParcelOverlay->encroachesOwned(bbox)) );
+}
+
void LLViewerRegion::showReleaseNotes()
{
std::string url = this->getCapability("ServerReleaseNotes");