From 4e7d0ddb2f86f5ae59f009d6cdbd9ca9b4e0a34a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Nov 2016 16:29:29 +0200 Subject: MAINT-6957 A high object bonus can cause incorrect parcel land capacity to appear in the build tool's Advanced floater --- indra/newview/llfloaterobjectweights.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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)); -- cgit v1.2.3