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

@@ -429,7 +429,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns></returns>
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<IEntityTransferModule>();
string version = String.Empty;