From 877bdcdce1533d8dc3e13c0def7b015080ee881e Mon Sep 17 00:00:00 2001
From: Robert Adams
Date: Sat, 15 Feb 2014 16:01:43 -0800
Subject: Rewrite of mega-region code to use new form of border checking. This
commit eliminates all of the 'border' class and list code and replaces it
with testing if in the current region. Impacts: can make a mega-region out of
varregions of the same size; and mega-region combinations must be rectangular
(not square but rectangular)
---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c6b98ca..0657cbb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -429,7 +429,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public bool IsAttachmentCheckFull()
{
- return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
+ return (IsAttachment || (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
}
private struct avtocrossInfo
@@ -451,19 +451,10 @@ namespace OpenSim.Region.Framework.Scenes
if (Scene != null)
{
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))
+ !Scene.PositionIsInCurrentRegion(val)
+ && !IsAttachmentCheckFull()
+ && (!Scene.LoadingPrims)
+ )
{
IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface();
string version = String.Empty;
--
cgit v1.1