diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs index a6e3859..eabdf51 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 | |||
478 | 478 | ||
479 | public void PostInitialise() | 479 | public void PostInitialise() |
480 | { | 480 | { |
481 | 481 | if (!enabledYN) | |
482 | return; | ||
483 | |||
484 | // Create a set of infinite borders around the whole aabb of the combined island. | ||
485 | lock (m_regions) | ||
486 | { | ||
487 | foreach (RegionConnections rconn in m_regions.Values) | ||
488 | { | ||
489 | Vector3 offset = Vector3.Zero; | ||
490 | rconn.RegionScene.BordersLocked = true; | ||
491 | foreach (RegionData rdata in rconn.ConnectedRegions) | ||
492 | { | ||
493 | if (rdata.Offset.X > offset.X) offset.X = rdata.Offset.X; | ||
494 | if (rdata.Offset.Y > offset.Y) offset.Y = rdata.Offset.Y; | ||
495 | |||
496 | } | ||
497 | |||
498 | lock (rconn.RegionScene.NorthBorders) | ||
499 | { | ||
500 | Border northBorder = new Border(); | ||
501 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, | ||
502 | offset.Y + (int) Constants.RegionSize); //<--- | ||
503 | northBorder.CrossDirection = Cardinals.N; | ||
504 | rconn.RegionScene.NorthBorders.Add(northBorder); | ||
505 | } | ||
506 | |||
507 | lock (rconn.RegionScene.SouthBorders) | ||
508 | { | ||
509 | Border southBorder = new Border(); | ||
510 | southBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //---> | ||
511 | southBorder.CrossDirection = Cardinals.S; | ||
512 | rconn.RegionScene.SouthBorders.Add(southBorder); | ||
513 | } | ||
514 | |||
515 | lock (rconn.RegionScene.EastBorders) | ||
516 | { | ||
517 | Border eastBorder = new Border(); | ||
518 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, offset.Y + (int)Constants.RegionSize); | ||
519 | //<--- | ||
520 | eastBorder.CrossDirection = Cardinals.E; | ||
521 | rconn.RegionScene.EastBorders.Add(eastBorder); | ||
522 | } | ||
523 | |||
524 | lock (rconn.RegionScene.WestBorders) | ||
525 | { | ||
526 | Border westBorder = new Border(); | ||
527 | westBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, 0); //---> | ||
528 | westBorder.CrossDirection = Cardinals.W; | ||
529 | rconn.RegionScene.WestBorders.Add(westBorder); | ||
530 | } | ||
531 | |||
532 | |||
533 | |||
534 | rconn.RegionScene.BordersLocked = false; | ||
535 | } | ||
536 | } | ||
482 | } | 537 | } |
483 | public void OnFrame() | 538 | public void OnFrame() |
484 | { | 539 | { |