summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterobjectweights.cpp
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2018-01-12 09:08:49 -0500
committerJonathan Yap <jhwelch@gmail.com>2018-01-12 09:08:49 -0500
commit1e586749efeeb8c40503330572680a8709ae5487 (patch)
tree5c1ebee5dbdb5004f354b9fb0837d60f6dd3cfcc /indra/newview/llfloaterobjectweights.cpp
parent32f16633c77564d567ed0752e56eb38abb916ccd (diff)
parent1693ccba58eef676df1f91e50627545ac35bb819 (diff)
STORM-2145 Merge up to viewer-release
Diffstat (limited to 'indra/newview/llfloaterobjectweights.cpp')
-rw-r--r--indra/newview/llfloaterobjectweights.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp
index feaeef4ad0..ed1ad4426f 100644
--- a/indra/newview/llfloaterobjectweights.cpp
+++ b/indra/newview/llfloaterobjectweights.cpp
@@ -145,6 +145,14 @@ void LLFloaterObjectWeights::updateLandImpacts(const LLParcel* parcel)
{
S32 rezzed_prims = parcel->getSimWidePrimCount();
S32 total_capacity = parcel->getSimWideMaxPrimCapacity();
+ // Can't have more than region max tasks, regardless of parcel
+ // object bonus factor.
+ LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
+ if (region)
+ {
+ S32 max_tasks_per_region = (S32)region->getMaxTasks();
+ total_capacity = llmin(total_capacity, max_tasks_per_region);
+ }
mRezzedOnLand->setText(llformat("%d", rezzed_prims));
mRemainingCapacity->setText(llformat("%d", total_capacity - rezzed_prims));