From 6820deed34fa87bc9b02376b382bae902052af9f Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 31 Dec 2010 15:45:08 +0100 Subject: Implement Scope ID lookup on GetLandData. Stacked regions were not handled properly --- .../CoreModules/World/Land/LandManagementModule.cs | 68 +++++++++++----------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Land') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 8449cc1..001ad87 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -1535,40 +1535,40 @@ namespace OpenSim.Region.CoreModules.World.Land if (parcelID == UUID.Zero) return; - ExtendedLandData data = - (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), - delegate(string id) - { - UUID parcel = UUID.Zero; - UUID.TryParse(id, out parcel); - // assume we've got the parcelID we just computed in RemoteParcelRequest - ExtendedLandData extLandData = new ExtendedLandData(); - Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, - out extLandData.X, out extLandData.Y); - m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", - extLandData.RegionHandle, extLandData.X, extLandData.Y); - - // for this region or for somewhere else? - if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) - { - extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; - extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; - } - else - { - ILandService landService = m_scene.RequestModuleInterface(); - extLandData.LandData = landService.GetLandData(extLandData.RegionHandle, - extLandData.X, - extLandData.Y, - out extLandData.RegionAccess); - if (extLandData.LandData == null) - { - // we didn't find the region/land => don't cache - return null; - } - } - return extLandData; - }); + ExtendedLandData data = (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), + delegate(string id) + { + UUID parcel = UUID.Zero; + UUID.TryParse(id, out parcel); + // assume we've got the parcelID we just computed in RemoteParcelRequest + ExtendedLandData extLandData = new ExtendedLandData(); + Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, + out extLandData.X, out extLandData.Y); + m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", + extLandData.RegionHandle, extLandData.X, extLandData.Y); + + // for this region or for somewhere else? + if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) + { + extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; + extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; + } + else + { + ILandService landService = m_scene.RequestModuleInterface(); + extLandData.LandData = landService.GetLandData(m_scene.RegionInfo.ScopeID, + extLandData.RegionHandle, + extLandData.X, + extLandData.Y, + out extLandData.RegionAccess); + if (extLandData.LandData == null) + { + // we didn't find the region/land => don't cache + return null; + } + } + return extLandData; + }); if (data != null) // if we found some data, send it { -- cgit v1.1