aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs22
1 files changed, 7 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c6b98ca..73a30f3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -429,7 +429,7 @@ namespace OpenSim.Region.Framework.Scenes
429 /// <returns></returns> 429 /// <returns></returns>
430 public bool IsAttachmentCheckFull() 430 public bool IsAttachmentCheckFull()
431 { 431 {
432 return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); 432 return (IsAttachment || (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
433 } 433 }
434 434
435 private struct avtocrossInfo 435 private struct avtocrossInfo
@@ -451,23 +451,15 @@ namespace OpenSim.Region.Framework.Scenes
451 if (Scene != null) 451 if (Scene != null)
452 { 452 {
453 if ( 453 if (
454 // (Scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) 454 !Scene.PositionIsInCurrentRegion(val)
455 // || Scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 455 && !IsAttachmentCheckFull()
456 // || Scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) 456 && (!Scene.LoadingPrims)
457 // || Scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) 457 )
458 // Experimental change for better border crossings.
459 // The commented out original lines above would, it seems, trigger
460 // a border crossing a little early or late depending on which
461 // direction the object was moving.
462 (Scene.TestBorderCross(val, Cardinals.E)
463 || Scene.TestBorderCross(val, Cardinals.W)
464 || Scene.TestBorderCross(val, Cardinals.N)
465 || Scene.TestBorderCross(val, Cardinals.S))
466 && !IsAttachmentCheckFull() && (!Scene.LoadingPrims))
467 { 458 {
468 IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 459 IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
469 string version = String.Empty; 460 string version = String.Empty;
470 Vector3 newpos = Vector3.Zero; 461 Vector3 newpos = Vector3.Zero;
462 string failureReason = String.Empty;
471 OpenSim.Services.Interfaces.GridRegion destination = null; 463 OpenSim.Services.Interfaces.GridRegion destination = null;
472 464
473 if (m_rootPart.KeyframeMotion != null) 465 if (m_rootPart.KeyframeMotion != null)
@@ -485,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
485 477
486 // We set the avatar position as being the object 478 // We set the avatar position as being the object
487 // position to get the region to send to 479 // position to get the region to send to
488 if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out version, out newpos)) == null) 480 if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out version, out newpos, out failureReason)) == null)
489 { 481 {
490 canCross = false; 482 canCross = false;
491 break; 483 break;