another try to prevent double crossing

avinationmerge
UbitUmarov 2014-10-26 10:08:13 +00:00
parent e59a9a54f1
commit 6600282fe9
1 changed files with 47 additions and 53 deletions

View File

@ -530,29 +530,24 @@ namespace OpenSim.Region.Framework.Scenes
{ {
Vector3 val = value; 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 ( lock (m_parts)
// (Scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) {
// || Scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) if (!inTransit)
// || 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))
{ {
inTransit = true; inTransit = true;
SOGCrossDelegate d = CrossAsync; SOGCrossDelegate d = CrossAsync;
d.BeginInvoke(this, val, CrossAsyncCompleted, d); d.BeginInvoke(this, val, CrossAsyncCompleted, d);
}
return; return;
} }
}
if (RootPart.GetStatusSandbox()) if (RootPart.GetStatusSandbox())
{ {
@ -602,7 +597,6 @@ namespace OpenSim.Region.Framework.Scenes
Scene.EventManager.TriggerParcelPrimCountTainted(); Scene.EventManager.TriggerParcelPrimCountTainted();
} }
} }
}
public SceneObjectGroup CrossAsync(SceneObjectGroup sog, Vector3 val) public SceneObjectGroup CrossAsync(SceneObjectGroup sog, Vector3 val)
{ {