aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-31 20:10:08 -0400
committerTeravus Ovares (Dan Olivares)2009-08-31 20:10:08 -0400
commitb8d21d9eae0d14c240668e4c73eb64d5bc773b07 (patch)
tree571ce4858bad89a7c12a2651602d6995b3971cb8 /OpenSim/Region/CoreModules/World
parent* Fix attachment cross issues with new borders. (diff)
downloadopensim-SC_OLD-b8d21d9eae0d14c240668e4c73eb64d5bc773b07.zip
opensim-SC_OLD-b8d21d9eae0d14c240668e4c73eb64d5bc773b07.tar.gz
opensim-SC_OLD-b8d21d9eae0d14c240668e4c73eb64d5bc773b07.tar.bz2
opensim-SC_OLD-b8d21d9eae0d14c240668e4c73eb64d5bc773b07.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs37
1 files changed, 24 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index eabdf51..4e03e95 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -14,7 +14,10 @@ namespace OpenSim.Region.CoreModules.World.Land
14 { 14 {
15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
16 16
17 public string Name { get { return "RegionCombinerModule"; } } 17 public string Name { get
18 {
19 return "RegionCombinerModule";
20 } }
18 public Type ReplaceableInterface 21 public Type ReplaceableInterface
19 { 22 {
20 get { return null; } 23 get { return null; }
@@ -22,11 +25,15 @@ namespace OpenSim.Region.CoreModules.World.Land
22 25
23 private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>(); 26 private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>();
24 private bool enabledYN = false; 27 private bool enabledYN = false;
28 private Dictionary<UUID, Scene> m_startingScenes = new Dictionary<UUID, Scene>();
29
25 public void Initialise(IConfigSource source) 30 public void Initialise(IConfigSource source)
26 { 31 {
32
27 IConfig myConfig = source.Configs["Startup"]; 33 IConfig myConfig = source.Configs["Startup"];
28 enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); 34 enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
29 //enabledYN = true; 35 //enabledYN = true;
36
30 } 37 }
31 38
32 public void Close() 39 public void Close()
@@ -36,9 +43,13 @@ namespace OpenSim.Region.CoreModules.World.Land
36 43
37 public void AddRegion(Scene scene) 44 public void AddRegion(Scene scene)
38 { 45 {
46
39 if (!enabledYN) 47 if (!enabledYN)
40 return; 48 return;
41 49
50 lock (m_startingScenes)
51 m_startingScenes.Add(scene.RegionInfo.originRegionID, scene);
52
42 Border northBorder = new Border(); 53 Border northBorder = new Border();
43 northBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<--- 54 northBorder.BorderLine = new Vector3(0, (int)Constants.RegionSize, (int)Constants.RegionSize); //<---
44 northBorder.CrossDirection = Cardinals.N; 55 northBorder.CrossDirection = Cardinals.N;
@@ -464,11 +475,13 @@ namespace OpenSim.Region.CoreModules.World.Land
464 } 475 }
465 476
466 } 477 }
478
467 } 479 }
468 480
469 public void RemoveRegion(Scene scene) 481 public void RemoveRegion(Scene scene)
470 { 482 {
471 483
484
472 } 485 }
473 486
474 public void RegionLoaded(Scene scene) 487 public void RegionLoaded(Scene scene)
@@ -478,10 +491,12 @@ namespace OpenSim.Region.CoreModules.World.Land
478 491
479 public void PostInitialise() 492 public void PostInitialise()
480 { 493 {
481 if (!enabledYN) 494
482 return; 495 }
483 496
484 // Create a set of infinite borders around the whole aabb of the combined island. 497 // Create a set of infinite borders around the whole aabb of the combined island.
498 private void MakeLargeRegionBounds()
499 {
485 lock (m_regions) 500 lock (m_regions)
486 { 501 {
487 foreach (RegionConnections rconn in m_regions.Values) 502 foreach (RegionConnections rconn in m_regions.Values)
@@ -499,7 +514,7 @@ namespace OpenSim.Region.CoreModules.World.Land
499 { 514 {
500 Border northBorder = new Border(); 515 Border northBorder = new Border();
501 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 516 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue,
502 offset.Y + (int) Constants.RegionSize); //<--- 517 offset.Y); //<---
503 northBorder.CrossDirection = Cardinals.N; 518 northBorder.CrossDirection = Cardinals.N;
504 rconn.RegionScene.NorthBorders.Add(northBorder); 519 rconn.RegionScene.NorthBorders.Add(northBorder);
505 } 520 }
@@ -515,8 +530,8 @@ namespace OpenSim.Region.CoreModules.World.Land
515 lock (rconn.RegionScene.EastBorders) 530 lock (rconn.RegionScene.EastBorders)
516 { 531 {
517 Border eastBorder = new Border(); 532 Border eastBorder = new Border();
518 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.Y + (int)Constants.RegionSize); 533 eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.Y);
519 //<--- 534 //<---
520 eastBorder.CrossDirection = Cardinals.E; 535 eastBorder.CrossDirection = Cardinals.E;
521 rconn.RegionScene.EastBorders.Add(eastBorder); 536 rconn.RegionScene.EastBorders.Add(eastBorder);
522 } 537 }
@@ -535,10 +550,6 @@ namespace OpenSim.Region.CoreModules.World.Land
535 } 550 }
536 } 551 }
537 } 552 }
538 public void OnFrame()
539 {
540
541 }
542 553
543 554
544 public RegionData GetRegionFromPosition(Vector3 pPosition) 555 public RegionData GetRegionFromPosition(Vector3 pPosition)