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/SceneObjectPart.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 1cf7726..db4e285 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2479,13 +2479,10 @@ namespace OpenSim.Region.Framework.Scenes if (pa != null) { - Vector3 newpos = new Vector3(pa.Position.GetBytes(), 0); - - if (ParentGroup.Scene.TestBorderCross(newpos, Cardinals.N) - | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.S) - | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.E) - | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.W)) + Vector3 newpos = pa.Position; + if (!ParentGroup.Scene.PositionIsInCurrentRegion(newpos)) { + // Setting position outside current region will start region crossing ParentGroup.AbsolutePosition = newpos; return; } -- cgit v1.1