mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Mantis #7765: Add new ClampNegativeZ option. Defaults to false to restore prior functionality.
Avination code wasn't designed for deep building.
This commit is contained in:
@@ -174,6 +174,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public SynchronizeSceneHandler SynchronizeScene;
|
||||
|
||||
public bool ClampNegativeZ
|
||||
{
|
||||
get { return m_clampNegativeZ; }
|
||||
}
|
||||
|
||||
private bool m_clampNegativeZ = false;
|
||||
|
||||
/// <summary>
|
||||
/// Used to prevent simultaneous calls to code that adds and removes agents.
|
||||
/// </summary>
|
||||
@@ -1029,6 +1036,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_clampPrimSize = true;
|
||||
}
|
||||
|
||||
m_clampNegativeZ = startupConfig.GetBoolean("ClampNegativeZ", m_clampNegativeZ);
|
||||
|
||||
m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
|
||||
m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
|
||||
m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
|
||||
|
||||
@@ -296,13 +296,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
|
||||
sceneObject.RootPart.GroupPosition.Y,
|
||||
sceneObject.RootPart.GroupPosition.Z);
|
||||
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 ||
|
||||
bool clampZ = m_parentScene.ClampNegativeZ;
|
||||
|
||||
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) ||
|
||||
npos.X > regionSizeX ||
|
||||
npos.Y > regionSizeY))
|
||||
{
|
||||
if (npos.X < 0.0) npos.X = 1.0f;
|
||||
if (npos.Y < 0.0) npos.Y = 1.0f;
|
||||
if (npos.Z < 0.0) npos.Z = 0.0f;
|
||||
if (npos.Z < 0.0 && clampZ) npos.Z = 0.0f;
|
||||
if (npos.X > regionSizeX) npos.X = regionSizeX - 1.0f;
|
||||
if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user