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)
This commit is contained in:
Robert Adams
2014-02-15 16:01:43 -08:00
parent bdbbeaa494
commit 877bdcdce1
7 changed files with 114 additions and 626 deletions

View File

@@ -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;
}