MAINT-6957 A high object bonus can cause incorrect parcel land capacity to appear in the build tool's Advanced floater

Mnikolenko Productengine 2016-11-23 16:29:29 +02:00
parent 70b71738d5
commit 4e7d0ddb2f
1 changed files with 8 additions and 0 deletions

View File

@ -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));