minor: Only calculate fetched usedPrims and simulatorCapacity info in PrimLimitsModule.CanObjectEnter() when we know for sure that we need them.
parent
7cb1690589
commit
444737c830
|
@ -132,9 +132,6 @@ namespace OpenSim.Region.OptionalModules
|
||||||
if (newParcel == null)
|
if (newParcel == null)
|
||||||
return true;
|
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
|
// The prim hasn't crossed a region boundry so we don't need to worry
|
||||||
// about prim counts here
|
// about prim counts here
|
||||||
if(oldParcel.Equals(newParcel))
|
if(oldParcel.Equals(newParcel))
|
||||||
|
@ -151,7 +148,10 @@ namespace OpenSim.Region.OptionalModules
|
||||||
|
|
||||||
// TODO: Add Special Case here for temporary prims
|
// TODO: Add Special Case here for temporary prims
|
||||||
|
|
||||||
if(objectCount + usedPrims > simulatorCapacity)
|
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");
|
m_dialogModule.SendAlertToUser(obj.OwnerID, "Unable to move object because the destination parcel is too full");
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue