From 895c612647c0e5ccc01b1d7a270dbec751188d62 Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Mon, 31 Aug 2009 16:29:27 -0400 Subject: [PATCH] * When the RegionCombinerModule is active add an extra set of borders with Infinite distances around the whole AABB of the region --- .../World/Land/RegionCombinerModule.cs | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs index a6e3859473..eabdf51d48 100644 --- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs @@ -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() {