mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
minor: Only calculate fetched usedPrims and simulatorCapacity info in PrimLimitsModule.CanObjectEnter() when we know for sure that we need them.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user