mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user