aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2015-11-26 17:29:50 +0100
committerMelanie Thielker2015-11-26 17:29:50 +0100
commit9afe2b018fbe444c0500695dbce37bdce126feee (patch)
tree8f1fe3730000885866a3883edc25ca0a7d897e97 /OpenSim
parent suspend the use of DisableSimulator, that is causing teleport and crossing i... (diff)
downloadopensim-SC_OLD-9afe2b018fbe444c0500695dbce37bdce126feee.zip
opensim-SC_OLD-9afe2b018fbe444c0500695dbce37bdce126feee.tar.gz
opensim-SC_OLD-9afe2b018fbe444c0500695dbce37bdce126feee.tar.bz2
opensim-SC_OLD-9afe2b018fbe444c0500695dbce37bdce126feee.tar.xz
Mantis #7765: Add new ClampNegativeZ option. Defaults to false to restore prior functionality.
Avination code wasn't designed for deep building.
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs9
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs6
2 files changed, 13 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