* Get rid of some debug info and kill the code to make a large AABB until I can figure out how to detect the fact that the system is done starting up new regions.
parent
b997174d08
commit
b8d21d9eae
|
@ -14,7 +14,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
public string Name { get { return "RegionCombinerModule"; } }
|
public string Name { get
|
||||||
|
{
|
||||||
|
return "RegionCombinerModule";
|
||||||
|
} }
|
||||||
public Type ReplaceableInterface
|
public Type ReplaceableInterface
|
||||||
{
|
{
|
||||||
get { return null; }
|
get { return null; }
|
||||||
|
@ -22,11 +25,15 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>();
|
private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>();
|
||||||
private bool enabledYN = false;
|
private bool enabledYN = false;
|
||||||
|
private Dictionary<UUID, Scene> m_startingScenes = new Dictionary<UUID, Scene>();
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
|
||||||
IConfig myConfig = source.Configs["Startup"];
|
IConfig myConfig = source.Configs["Startup"];
|
||||||
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
|
||||||
//enabledYN = true;
|
//enabledYN = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
@ -36,9 +43,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!enabledYN)
|
if (!enabledYN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
lock (m_startingScenes)
|
||||||
|
m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
|
||||||
|
|
||||||
Border northBorder = new Border();
|
Border northBorder = new Border();
|
||||||
northBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
|
northBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
|
||||||
northBorder.CrossDirection = Cardinals.N;
|
northBorder.CrossDirection = Cardinals.N;
|
||||||
|
@ -464,11 +475,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
|
@ -478,10 +491,12 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
if (!enabledYN)
|
|
||||||
return;
|
}
|
||||||
|
|
||||||
// Create a set of infinite borders around the whole aabb of the combined island.
|
// Create a set of infinite borders around the whole aabb of the combined island.
|
||||||
|
private void MakeLargeRegionBounds()
|
||||||
|
{
|
||||||
lock (m_regions)
|
lock (m_regions)
|
||||||
{
|
{
|
||||||
foreach (RegionConnections rconn in m_regions.Values)
|
foreach (RegionConnections rconn in m_regions.Values)
|
||||||
|
@ -499,7 +514,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
Border northBorder = new Border();
|
Border northBorder = new Border();
|
||||||
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,
|
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,
|
||||||
offset.Y + (int) Constants.RegionSize); //<---
|
offset.Y); //<---
|
||||||
northBorder.CrossDirection = Cardinals.N;
|
northBorder.CrossDirection = Cardinals.N;
|
||||||
rconn.RegionScene.NorthBorders.Add(northBorder);
|
rconn.RegionScene.NorthBorders.Add(northBorder);
|
||||||
}
|
}
|
||||||
|
@ -515,7 +530,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
lock (rconn.RegionScene.EastBorders)
|
lock (rconn.RegionScene.EastBorders)
|
||||||
{
|
{
|
||||||
Border eastBorder = new Border();
|
Border eastBorder = new Border();
|
||||||
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.Y + (int)Constants.RegionSize);
|
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.Y);
|
||||||
//<---
|
//<---
|
||||||
eastBorder.CrossDirection = Cardinals.E;
|
eastBorder.CrossDirection = Cardinals.E;
|
||||||
rconn.RegionScene.EastBorders.Add(eastBorder);
|
rconn.RegionScene.EastBorders.Add(eastBorder);
|
||||||
|
@ -535,10 +550,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void OnFrame()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public RegionData GetRegionFromPosition(Vector3 pPosition)
|
public RegionData GetRegionFromPosition(Vector3 pPosition)
|
||||||
|
|
Loading…
Reference in New Issue