minor: Only calculate fetched usedPrims and simulatorCapacity info in PrimLimitsModule.CanObjectEnter() when we know for sure that we need them.

0.8.0.3
Justin Clark-Casey (justincc) 2014-04-02 01:05:37 +01:00
parent 7cb1690589
commit 444737c830
1 changed files with 4 additions and 4 deletions

View File

@ -132,9 +132,6 @@ namespace OpenSim.Region.OptionalModules
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
if(oldParcel.Equals(newParcel))
@ -151,6 +148,9 @@ 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)
{
m_dialogModule.SendAlertToUser(obj.OwnerID, "Unable to move object because the destination parcel is too full");