another try to prevent double crossing
parent
e59a9a54f1
commit
6600282fe9
|
@ -530,29 +530,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
Vector3 val = value;
|
||||
|
||||
if (Scene != null && !inTransit)
|
||||
if (!IsAttachmentCheckFull() && !Scene.LoadingPrims &&
|
||||
( Scene.TestBorderCross(val, Cardinals.E) ||
|
||||
Scene.TestBorderCross(val, Cardinals.W) ||
|
||||
Scene.TestBorderCross(val, Cardinals.N) ||
|
||||
Scene.TestBorderCross(val, Cardinals.S))
|
||||
)
|
||||
{
|
||||
if (
|
||||
// (Scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E)
|
||||
// || Scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
|
||||
// || Scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N)
|
||||
// || Scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
|
||||
// Experimental change for better border crossings.
|
||||
// The commented out original lines above would, it seems, trigger
|
||||
// a border crossing a little early or late depending on which
|
||||
// direction the object was moving.
|
||||
(Scene.TestBorderCross(val, Cardinals.E)
|
||||
|| Scene.TestBorderCross(val, Cardinals.W)
|
||||
|| Scene.TestBorderCross(val, Cardinals.N)
|
||||
|| Scene.TestBorderCross(val, Cardinals.S))
|
||||
&& !IsAttachmentCheckFull() && (!Scene.LoadingPrims))
|
||||
lock (m_parts)
|
||||
{
|
||||
if (!inTransit)
|
||||
{
|
||||
inTransit = true;
|
||||
SOGCrossDelegate d = CrossAsync;
|
||||
d.BeginInvoke(this, val, CrossAsyncCompleted, d);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (RootPart.GetStatusSandbox())
|
||||
{
|
||||
|
@ -602,7 +597,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Scene.EventManager.TriggerParcelPrimCountTainted();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SceneObjectGroup CrossAsync(SceneObjectGroup sog, Vector3 val)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue