* When the RegionCombinerModule is active add an extra set of borders with Infinite distances around the whole AABB of the region

remotes/origin/0.6.7-post-fixes
Teravus Ovares (Dan Olivares) 2009-08-31 16:29:27 -04:00
parent ca673a7744
commit 895c612647
1 changed files with 56 additions and 1 deletions

View File

@ -478,7 +478,62 @@ namespace OpenSim.Region.CoreModules.World.Land
public void PostInitialise()
{
if (!enabledYN)
return;
// Create a set of infinite borders around the whole aabb of the combined island.
lock (m_regions)
{
foreach (RegionConnections rconn in m_regions.Values)
{
Vector3 offset = Vector3.Zero;
rconn.RegionScene.BordersLocked = true;
foreach (RegionData rdata in rconn.ConnectedRegions)
{
if (rdata.Offset.X > offset.X) offset.X = rdata.Offset.X;
if (rdata.Offset.Y > offset.Y) offset.Y = rdata.Offset.Y;
}
lock (rconn.RegionScene.NorthBorders)
{
Border northBorder = new Border();
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,
offset.Y + (int) Constants.RegionSize); //<---
northBorder.CrossDirection = Cardinals.N;
rconn.RegionScene.NorthBorders.Add(northBorder);
}
lock (rconn.RegionScene.SouthBorders)
{
Border southBorder = new Border();
southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
southBorder.CrossDirection = Cardinals.S;
rconn.RegionScene.SouthBorders.Add(southBorder);
}
lock (rconn.RegionScene.EastBorders)
{
Border eastBorder = new Border();
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.Y + (int)Constants.RegionSize);
//<---
eastBorder.CrossDirection = Cardinals.E;
rconn.RegionScene.EastBorders.Add(eastBorder);
}
lock (rconn.RegionScene.WestBorders)
{
Border westBorder = new Border();
westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //--->
westBorder.CrossDirection = Cardinals.W;
rconn.RegionScene.WestBorders.Add(westBorder);
}
rconn.RegionScene.BordersLocked = false;
}
}
}
public void OnFrame()
{