Mantis #7765: Add new ClampNegativeZ option. Defaults to false to restore prior functionality.
Avination code wasn't designed for deep building.LSLKeyTest
parent
172bb05ec2
commit
9afe2b018f
|
@ -174,6 +174,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public SynchronizeSceneHandler SynchronizeScene;
|
public SynchronizeSceneHandler SynchronizeScene;
|
||||||
|
|
||||||
|
public bool ClampNegativeZ
|
||||||
|
{
|
||||||
|
get { return m_clampNegativeZ; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool m_clampNegativeZ = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to prevent simultaneous calls to code that adds and removes agents.
|
/// Used to prevent simultaneous calls to code that adds and removes agents.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1029,6 +1036,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_clampPrimSize = true;
|
m_clampPrimSize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_clampNegativeZ = startupConfig.GetBoolean("ClampNegativeZ", m_clampNegativeZ);
|
||||||
|
|
||||||
m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
|
m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
|
||||||
m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
|
m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
|
||||||
m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
|
m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
|
||||||
|
|
|
@ -296,13 +296,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
|
Vector3 npos = new Vector3(sceneObject.RootPart.GroupPosition.X,
|
||||||
sceneObject.RootPart.GroupPosition.Y,
|
sceneObject.RootPart.GroupPosition.Y,
|
||||||
sceneObject.RootPart.GroupPosition.Z);
|
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.X > regionSizeX ||
|
||||||
npos.Y > regionSizeY))
|
npos.Y > regionSizeY))
|
||||||
{
|
{
|
||||||
if (npos.X < 0.0) npos.X = 1.0f;
|
if (npos.X < 0.0) npos.X = 1.0f;
|
||||||
if (npos.Y < 0.0) npos.Y = 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.X > regionSizeX) npos.X = regionSizeX - 1.0f;
|
||||||
if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f;
|
if (npos.Y > regionSizeY) npos.Y = regionSizeY - 1.0f;
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,9 @@
|
||||||
; This can be overridden in the region config file.
|
; This can be overridden in the region config file.
|
||||||
ClampPrimSize = false
|
ClampPrimSize = false
|
||||||
|
|
||||||
|
; If a prim is loaded from an external source, clamp it to Z = 0 if Z is negative.
|
||||||
|
ClampNegativeZ = false
|
||||||
|
|
||||||
; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero.
|
; Maximum number of prims allowable in a linkset. Affects creating new linksets. Ignored if less than or equal to zero.
|
||||||
; This can be overridden in the region config file.
|
; This can be overridden in the region config file.
|
||||||
LinksetPrims = 0
|
LinksetPrims = 0
|
||||||
|
|
Loading…
Reference in New Issue