aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorDiva Canto2014-07-04 11:45:30 -0700
committerJustin Clark-Casey2014-08-02 00:51:49 +0100
commit3730163e5d469addc9c225cb9ab2c74dc2e9cb1f (patch)
tree8e876969148b6abe668b8243eec4f9db55712e29 /OpenSim/Region/Framework/Scenes/Scene.cs
parentIt turns out that child agent management has had a bug for a while: there was... (diff)
downloadopensim-SC_OLD-3730163e5d469addc9c225cb9ab2c74dc2e9cb1f.zip
opensim-SC_OLD-3730163e5d469addc9c225cb9ab2c74dc2e9cb1f.tar.gz
opensim-SC_OLD-3730163e5d469addc9c225cb9ab2c74dc2e9cb1f.tar.bz2
opensim-SC_OLD-3730163e5d469addc9c225cb9ab2c74dc2e9cb1f.tar.xz
This fixes the bug related to rebooting neighboring varregions while avatars are logged in; the avies would not see the region anymore until they relogged. Same problem as before: inconsistent calculation of scope.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-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);