* When the RegionCombinerModule is off, make borders have an infinite aabb perpendicular to the cardinal
parent
2f40161f38
commit
59c8a02a24
|
@ -28,7 +28,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
IConfig myConfig = source.Configs["Startup"];
|
IConfig myConfig = source.Configs["Startup"];
|
||||||
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
||||||
|
//enabledYN = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -41,6 +41,26 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (!enabledYN)
|
if (!enabledYN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Border northBorder = new Border();
|
||||||
|
northBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
|
||||||
|
northBorder.CrossDirection = Cardinals.N;
|
||||||
|
scene.NorthBorders[0] = northBorder;
|
||||||
|
|
||||||
|
Border southBorder = new Border();
|
||||||
|
southBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, 0); //--->
|
||||||
|
southBorder.CrossDirection = Cardinals.S;
|
||||||
|
scene.SouthBorders[0] = southBorder;
|
||||||
|
|
||||||
|
Border eastBorder = new Border();
|
||||||
|
eastBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
|
||||||
|
eastBorder.CrossDirection = Cardinals.E;
|
||||||
|
scene.EastBorders[0] = eastBorder;
|
||||||
|
|
||||||
|
Border westBorder = new Border();
|
||||||
|
westBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, 0); //--->
|
||||||
|
westBorder.CrossDirection = Cardinals.W;
|
||||||
|
scene.WestBorders[0] = westBorder;
|
||||||
|
|
||||||
RegionConnections regionConnections = new RegionConnections();
|
RegionConnections regionConnections = new RegionConnections();
|
||||||
regionConnections.ConnectedRegions = new List<RegionData>();
|
regionConnections.ConnectedRegions = new List<RegionData>();
|
||||||
regionConnections.RegionScene = scene;
|
regionConnections.RegionScene = scene;
|
||||||
|
|
|
@ -489,22 +489,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
BordersLocked = true;
|
BordersLocked = true;
|
||||||
Border northBorder = new Border();
|
Border northBorder = new Border();
|
||||||
northBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
|
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
||||||
northBorder.CrossDirection = Cardinals.N;
|
northBorder.CrossDirection = Cardinals.N;
|
||||||
NorthBorders.Add(northBorder);
|
NorthBorders.Add(northBorder);
|
||||||
|
|
||||||
Border southBorder = new Border();
|
Border southBorder = new Border();
|
||||||
southBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, 0); //--->
|
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
|
||||||
southBorder.CrossDirection = Cardinals.S;
|
southBorder.CrossDirection = Cardinals.S;
|
||||||
SouthBorders.Add(southBorder);
|
SouthBorders.Add(southBorder);
|
||||||
|
|
||||||
Border eastBorder = new Border();
|
Border eastBorder = new Border();
|
||||||
eastBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
|
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
||||||
eastBorder.CrossDirection = Cardinals.E;
|
eastBorder.CrossDirection = Cardinals.E;
|
||||||
EastBorders.Add(eastBorder);
|
EastBorders.Add(eastBorder);
|
||||||
|
|
||||||
Border westBorder = new Border();
|
Border westBorder = new Border();
|
||||||
westBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, 0); //--->
|
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
|
||||||
westBorder.CrossDirection = Cardinals.W;
|
westBorder.CrossDirection = Cardinals.W;
|
||||||
WestBorders.Add(westBorder);
|
WestBorders.Add(westBorder);
|
||||||
BordersLocked = false;
|
BordersLocked = false;
|
||||||
|
@ -3354,7 +3354,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Utils.LongToUInts(regionHandle, out regionX, out regionY);
|
Utils.LongToUInts(regionHandle, out regionX, out regionY);
|
||||||
|
|
||||||
int shiftx = (int) regionX - (int) m_regInfo.RegionLocX * (int)Constants.RegionSize;
|
int shiftx = (int) regionX - (int) m_regInfo.RegionLocX * (int)Constants.RegionSize;
|
||||||
int shifty = (int)regionY - (int)m_regInfo.RegionLocY * (int)Constants.RegionSize;
|
int shifty = (int) regionY - (int) m_regInfo.RegionLocY * (int)Constants.RegionSize;
|
||||||
|
|
||||||
position.X += shiftx;
|
position.X += shiftx;
|
||||||
position.Y += shifty;
|
position.Y += shifty;
|
||||||
|
|
Loading…
Reference in New Issue