aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3957ba6..27042a3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1069,18 +1069,22 @@ namespace OpenSim.Region.Framework.Scenes
1069 /// <returns>True after all operations complete, throws exceptions otherwise.</returns> 1069 /// <returns>True after all operations complete, throws exceptions otherwise.</returns>
1070 public override void OtherRegionUp(GridRegion otherRegion) 1070 public override void OtherRegionUp(GridRegion otherRegion)
1071 { 1071 {
1072 uint xcell = Util.WorldToRegionLoc((uint)otherRegion.RegionLocX);
1073 uint ycell = Util.WorldToRegionLoc((uint)otherRegion.RegionLocY);
1074
1075 //m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}",
1076 // RegionInfo.RegionName, otherRegion.RegionName, xcell, ycell);
1077
1078 if (RegionInfo.RegionHandle != otherRegion.RegionHandle) 1072 if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
1079 { 1073 {
1080 // If these are cast to INT because long + negative values + abs returns invalid data 1074 //// If these are cast to INT because long + negative values + abs returns invalid data
1081 int resultX = Math.Abs((int)xcell - (int)RegionInfo.RegionLocX); 1075 //int resultX = Math.Abs((int)xcell - (int)RegionInfo.RegionLocX);
1082 int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY); 1076 //int resultY = Math.Abs((int)ycell - (int)RegionInfo.RegionLocY);
1083 if (resultX <= 1 && resultY <= 1) 1077 //if (resultX <= 1 && resultY <= 1)
1078 float dist = (float)Math.Max(DefaultDrawDistance,
1079 (float)Math.Max(RegionInfo.RegionSizeX, RegionInfo.RegionSizeY));
1080 uint newRegionX, newRegionY, thisRegionX, thisRegionY;
1081 Util.RegionHandleToRegionLoc(otherRegion.RegionHandle, out newRegionX, out newRegionY);
1082 Util.RegionHandleToRegionLoc(RegionInfo.RegionHandle, out thisRegionX, out thisRegionY);
1083
1084 //m_log.InfoFormat("[SCENE]: (on region {0}): Region {1} up in coords {2}-{3}",
1085 // RegionInfo.RegionName, otherRegion.RegionName, newRegionX, newRegionY);
1086
1087 if (!Util.IsOutsideView(dist, thisRegionX, newRegionX, thisRegionY, newRegionY))
1084 { 1088 {
1085 // Let the grid service module know, so this can be cached 1089 // Let the grid service module know, so this can be cached
1086 m_eventManager.TriggerOnRegionUp(otherRegion); 1090 m_eventManager.TriggerOnRegionUp(otherRegion);