mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user