diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index c1957e2..59ff9b8 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | |||
@@ -121,12 +121,18 @@ namespace OpenSim.Region.OptionalModules | |||
121 | 121 | ||
122 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) | 122 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) |
123 | { | 123 | { |
124 | if ((newPoint.X > 257f || newPoint.X < -1f || newPoint.Y > 257f || newPoint.Y < -1f)) | ||
125 | return true; | ||
126 | |||
124 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); | 127 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); |
125 | Vector3 oldPoint = obj.GroupPosition; | 128 | Vector3 oldPoint = obj.GroupPosition; |
126 | int objectCount = obj.ParentGroup.PrimCount; | 129 | int objectCount = obj.ParentGroup.PrimCount; |
127 | ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); | 130 | ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); |
128 | ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); | 131 | ILandObject newParcel = scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); |
129 | 132 | ||
133 | if (newParcel == null) | ||
134 | return true; | ||
135 | |||
130 | int usedPrims = newParcel.PrimCounts.Total; | 136 | int usedPrims = newParcel.PrimCounts.Total; |
131 | int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); | 137 | int simulatorCapacity = newParcel.GetSimulatorMaxPrimCount(); |
132 | 138 | ||
@@ -171,4 +177,4 @@ namespace OpenSim.Region.OptionalModules | |||
171 | return true; | 177 | return true; |
172 | } | 178 | } |
173 | } | 179 | } |
174 | } \ No newline at end of file | 180 | } |