From 444737c830020970768b75fe97947376f144e1d8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Apr 2014 01:05:37 +0100 Subject: minor: Only calculate fetched usedPrims and simulatorCapacity info in PrimLimitsModule.CanObjectEnter() when we know for sure that we need them. --- .../Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index 18cec6c..b977ad8 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs @@ -131,9 +131,6 @@ namespace OpenSim.Region.OptionalModules // receiving permissions will perform the check. if (newParcel == null) return true; - - int usedPrims = newParcel.PrimCounts.Total; - int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); // The prim hasn't crossed a region boundry so we don't need to worry // about prim counts here @@ -150,8 +147,11 @@ namespace OpenSim.Region.OptionalModules } // TODO: Add Special Case here for temporary prims + + int usedPrims = newParcel.PrimCounts.Total; + int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); - if(objectCount + usedPrims > simulatorCapacity) + if (objectCount + usedPrims > simulatorCapacity) { m_dialogModule.SendAlertToUser(obj.OwnerID, "Unable to move object because the destination parcel is too full"); return false; -- cgit v1.1