aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
diff options
context:
space:
mode:
authorMelanie2012-03-06 22:27:01 +0100
committerMelanie2012-03-06 22:27:01 +0100
commit0be4ed3df42d4cd566110b30d84780e85f848c92 (patch)
tree77f71d99fc9dc95c888bc2d1f7c053b159e0bb31 /OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
parentNull PhysActor on SOP.Copy() to prevent clobbering the original one (diff)
downloadopensim-SC-0be4ed3df42d4cd566110b30d84780e85f848c92.zip
opensim-SC-0be4ed3df42d4cd566110b30d84780e85f848c92.tar.gz
opensim-SC-0be4ed3df42d4cd566110b30d84780e85f848c92.tar.bz2
opensim-SC-0be4ed3df42d4cd566110b30d84780e85f848c92.tar.xz
Prevent scripted region crossings from crashing with prim limits enabled
Diffstat (limited to 'OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs8
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}