diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-11-23 16:29:29 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-11-23 16:29:29 +0200 |
commit | 4e7d0ddb2f86f5ae59f009d6cdbd9ca9b4e0a34a (patch) | |
tree | 851d2a34f5f9e86cc98e81aff62b57c2c0751753 /indra/newview/llfloaterobjectweights.cpp | |
parent | 70b71738d5222aa1cc56047c382f6024d6388486 (diff) |
MAINT-6957 A high object bonus can cause incorrect parcel land capacity to appear in the build tool's Advanced floater
Diffstat (limited to 'indra/newview/llfloaterobjectweights.cpp')
-rw-r--r-- | indra/newview/llfloaterobjectweights.cpp | 8 |
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)); |