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.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 432da2e990..63eb08e4ae 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -309,6 +309,14 @@ void LLViewerParcelMgr::resetSegments(U8* segments)
void LLViewerParcelMgr::writeHighlightSegments(F32 west, F32 south, F32 east,
F32 north)
{
+ if (west < 0 || south < 0 || east < 0 || north < 0)
+ {
+ LL_WARNS() << "Invalid parcel edge coordinates provided to writeHighlightSegments- "
+ << "west: " << west << ", south: " << south << ", east: " << east << ", north: " << north
+ << LL_ENDL;
+ return;
+ }
+
S32 x, y;
S32 min_x = ll_round( west / PARCEL_GRID_STEP_METERS );
S32 max_x = ll_round( east / PARCEL_GRID_STEP_METERS );
@@ -702,6 +710,16 @@ bool LLViewerParcelMgr::allowAgentVoice() const
return allowAgentVoice(gAgent.getRegion(), mAgentParcel);
}
+bool LLViewerParcelMgr::isVoiceRestricted() const
+{
+ return mAgentParcel && !mAgentParcel->getParcelFlagUseEstateVoiceChannel();
+}
+
+bool LLViewerParcelMgr::allowVoiceModeration() const
+{
+ return isVoiceRestricted() && isParcelOwnedByAgent(mAgentParcel, GP_SESSION_MODERATOR);
+}
+
bool LLViewerParcelMgr::allowAgentVoice(const LLViewerRegion* region, const LLParcel* parcel) const
{
return region && region->isVoiceEnabled()
@@ -881,7 +899,8 @@ LLParcel* LLViewerParcelMgr::getCollisionParcel() const
void LLViewerParcelMgr::render()
{
- if (mSelected && mRenderSelection && gSavedSettings.getBOOL("RenderParcelSelection") && !gDisconnected)
+ static LLCachedControl<bool> render_parcel_selection(gSavedSettings, "RenderParcelSelection");
+ if (mSelected && mRenderSelection && render_parcel_selection() && !gDisconnected)
{
// Rendering is done in agent-coordinates, so need to supply
// an appropriate offset to the render code.