diff options
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs')
-rw-r--r-- | OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 37b3037..3af5cc2 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |||
@@ -67,8 +67,22 @@ namespace OpenSim.Region.RegionCombinerModule | |||
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | /// <summary> | ||
71 | /// This holds the root regions for the megaregions. | ||
72 | /// </summary> | ||
73 | /// <remarks> | ||
74 | /// At this point we can actually assume there is only ever one megaregion (and hence only one entry here). | ||
75 | /// </remarks> | ||
70 | private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>(); | 76 | private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>(); |
77 | |||
78 | /// <summary> | ||
79 | /// Is this module enabled? | ||
80 | /// </summary> | ||
71 | private bool enabledYN = false; | 81 | private bool enabledYN = false; |
82 | |||
83 | /// <summary> | ||
84 | /// The scenes that comprise the megaregion. | ||
85 | /// </summary> | ||
72 | private Dictionary<UUID, Scene> m_startingScenes = new Dictionary<UUID, Scene>(); | 86 | private Dictionary<UUID, Scene> m_startingScenes = new Dictionary<UUID, Scene>(); |
73 | 87 | ||
74 | public void Initialise(IConfigSource source) | 88 | public void Initialise(IConfigSource source) |
@@ -448,9 +462,9 @@ namespace OpenSim.Region.RegionCombinerModule | |||
448 | if (!connectedYN) | 462 | if (!connectedYN) |
449 | { | 463 | { |
450 | DoWorkForRootRegion(regionConnections, scene); | 464 | DoWorkForRootRegion(regionConnections, scene); |
451 | |||
452 | } | 465 | } |
453 | } | 466 | } |
467 | |||
454 | // Set up infinite borders around the entire AABB of the combined ConnectedRegions | 468 | // Set up infinite borders around the entire AABB of the combined ConnectedRegions |
455 | AdjustLargeRegionBounds(); | 469 | AdjustLargeRegionBounds(); |
456 | } | 470 | } |
@@ -469,9 +483,10 @@ namespace OpenSim.Region.RegionCombinerModule | |||
469 | 483 | ||
470 | conn.UpdateExtents(extents); | 484 | conn.UpdateExtents(extents); |
471 | 485 | ||
472 | m_log.DebugFormat("Scene: {0} to the west of Scene{1} Offset: {2}. Extents:{3}", | 486 | m_log.DebugFormat( |
473 | conn.RegionScene.RegionInfo.RegionName, | 487 | "[REGION COMBINER MODULE]: Scene {0} to the west of Scene {1}, Offset: {2}, Extents: {3}", |
474 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | 488 | conn.RegionScene.RegionInfo.RegionName, |
489 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | ||
475 | 490 | ||
476 | scene.BordersLocked = true; | 491 | scene.BordersLocked = true; |
477 | conn.RegionScene.BordersLocked = true; | 492 | conn.RegionScene.BordersLocked = true; |
@@ -547,9 +562,10 @@ namespace OpenSim.Region.RegionCombinerModule | |||
547 | ConnectedRegion.RegionScene = scene; | 562 | ConnectedRegion.RegionScene = scene; |
548 | conn.ConnectedRegions.Add(ConnectedRegion); | 563 | conn.ConnectedRegions.Add(ConnectedRegion); |
549 | 564 | ||
550 | m_log.DebugFormat("Scene: {0} to the northeast of Scene{1} Offset: {2}. Extents:{3}", | 565 | m_log.DebugFormat( |
551 | conn.RegionScene.RegionInfo.RegionName, | 566 | "[REGION COMBINER MODULE]: Scene: {0} to the northeast of Scene {1}, Offset: {2}, Extents: {3}", |
552 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | 567 | conn.RegionScene.RegionInfo.RegionName, |
568 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | ||
553 | 569 | ||
554 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); | 570 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); |
555 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); | 571 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); |
@@ -602,9 +618,10 @@ namespace OpenSim.Region.RegionCombinerModule | |||
602 | 618 | ||
603 | conn.ConnectedRegions.Add(ConnectedRegion); | 619 | conn.ConnectedRegions.Add(ConnectedRegion); |
604 | 620 | ||
605 | m_log.DebugFormat("Scene: {0} to the NorthEast of Scene{1} Offset: {2}. Extents:{3}", | 621 | m_log.DebugFormat( |
606 | conn.RegionScene.RegionInfo.RegionName, | 622 | "[REGION COMBINER MODULE]: Scene: {0} to the NorthEast of Scene {1}, Offset: {2}, Extents: {3}", |
607 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | 623 | conn.RegionScene.RegionInfo.RegionName, |
624 | regionConnections.RegionScene.RegionInfo.RegionName, offset, extents); | ||
608 | 625 | ||
609 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); | 626 | conn.RegionScene.PhysicsScene.Combine(null, Vector3.Zero, extents); |
610 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); | 627 | scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset, Vector3.Zero); |
@@ -681,6 +698,8 @@ namespace OpenSim.Region.RegionCombinerModule | |||
681 | 698 | ||
682 | private void DoWorkForRootRegion(RegionConnections regionConnections, Scene scene) | 699 | private void DoWorkForRootRegion(RegionConnections regionConnections, Scene scene) |
683 | { | 700 | { |
701 | m_log.DebugFormat("[REGION COMBINER MODULE]: Adding root region {0}", scene.RegionInfo.RegionName); | ||
702 | |||
684 | RegionData rdata = new RegionData(); | 703 | RegionData rdata = new RegionData(); |
685 | rdata.Offset = Vector3.Zero; | 704 | rdata.Offset = Vector3.Zero; |
686 | rdata.RegionId = scene.RegionInfo.originRegionID; | 705 | rdata.RegionId = scene.RegionInfo.originRegionID; |