diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index 2fd21be8f5..551947bd45 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs @@ -128,9 +128,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land { m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", regionHandle, m_Scenes.Count); + + uint rx = 0, ry = 0; + Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry); + foreach (Scene s in m_Scenes) { - if (s.RegionInfo.RegionHandle == regionHandle) + uint t = s.RegionInfo.WorldLocX; + if( rx < t) + continue; + t += s.RegionInfo.RegionSizeX; + if( rx >= t) + continue; + t = s.RegionInfo.WorldLocY; + if( ry < t) + continue; + t += s.RegionInfo.RegionSizeY; + if( ry < t) { m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from"); regionAccess = s.RegionInfo.AccessLevel; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs index 532993316a..2e2296569b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs @@ -124,9 +124,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}", regionHandle, x, y); + uint rx = 0, ry = 0; + Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry); + foreach (Scene s in m_Scenes) { - if (s.RegionInfo.RegionHandle == regionHandle) + uint t = s.RegionInfo.WorldLocX; + if( rx < t) + continue; + t += s.RegionInfo.RegionSizeX; + if( rx >= t) + continue; + t = s.RegionInfo.WorldLocY; + if( ry < t) + continue; + t += s.RegionInfo.RegionSizeY; + if( ry < t) { LandData land = s.GetLandData(x, y); regionAccess = s.RegionInfo.AccessLevel;