aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs9
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs6
-rw-r--r--bin/OpenSimDefaults.ini3
3 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 55c4fda..2296981 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -174,6 +174,13 @@ namespace OpenSim.Region.Framework.Scenes
174 174
175 public SynchronizeSceneHandler SynchronizeScene; 175 public SynchronizeSceneHandler SynchronizeScene;
176 176
177 public bool ClampNegativeZ
178 {
179 get { return m_clampNegativeZ; }
180 }
181
182 private bool m_clampNegativeZ = false;
183
177 /// <summary> 184 /// <summary>
178 /// Used to prevent simultaneous calls to code that adds and removes agents. 185 /// Used to prevent simultaneous calls to code that adds and removes agents.
179 /// </summary> 186 /// </summary>
@@ -1029,6 +1036,8 @@ namespace OpenSim.Region.Framework.Scenes
1029 m_clampPrimSize = true; 1036 m_clampPrimSize = true;
1030 } 1037 }
1031 1038
1039 m_clampNegativeZ = startupConfig.GetBoolean("ClampNegativeZ", m_clampNegativeZ);
1040
1032 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete); 1041 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
1033 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); 1042 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
1034 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); 1043 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 9308500..2ecb55b 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -296,13 +296,15 @@ namespace OpenSim.Region.Framework.Scenes
296 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X, 296 Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
297 sceneObject.RootPart.GroupPosition.Y, 297 sceneObject.RootPart.GroupPosition.Y,
298 sceneObject.RootPart.GroupPosition.Z); 298 sceneObject.RootPart.GroupPosition.Z);
299 if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || npos.Z < 0.0 || 299 bool clampZ = m_parentScene.ClampNegativeZ;
300
301 if (!(((sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim) && (sceneObject.RootPart.Shape.State != 0))) && (npos.X < 0.0 || npos.Y < 0.0 || (npos.Z < 0.0 && clampZ) ||
300 npos.X > regionSizeX || 302 npos.X > regionSizeX ||
301 npos.Y > regionSizeY)) 303 npos.Y > regionSizeY))
302 { 304 {
303 if (npos.X < 0.0) npos.X = 1.0f; 305 if (npos.X < 0.0) npos.X = 1.0f;
304 if (npos.Y < 0.0) npos.Y = 1.0f; 306 if (npos.Y < 0.0) npos.Y = 1.0f;
305 if (npos.Z < 0.0) npos.Z = 0.0f; 307 if (npos.Z < 0.0 && clampZ) npos.Z = 0.0f;
306 if (npos.X > regionSizeX) npos.X = regionSizeX - 1.0f; 308 if (npos.X > regionSizeX) npos.X = regionSizeX - 1.0f;
307 if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f; 309 if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f;
308 310
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 09dda10..7221353 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -138,6 +138,9 @@
138 ; This can be overridden in the region config file. 138 ; This can be overridden in the region config file.
139 ClampPrimSize = false 139 ClampPrimSize = false
140 140
141 ; If a prim is loaded from an external source, clamp it to Z = 0 if Z is negative.
142 ClampNegativeZ = false
143
141 ; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero. 144 ; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero.
142 ; This can be overridden in the region config file. 145 ; This can be overridden in the region config file.
143 LinksetPrims = 0 146 LinksetPrims = 0