aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land
diff options
context:
space:
mode:
authorMelanie2010-12-31 15:45:08 +0100
committerMelanie2010-12-31 15:45:08 +0100
commit6820deed34fa87bc9b02376b382bae902052af9f (patch)
tree5efa55542a661607466e46abc593ed1956b0ade7 /OpenSim/Region/CoreModules/World/Land
parentAdd MessageKey to section Messaging, a key that prevents injection of (diff)
downloadopensim-SC_OLD-6820deed34fa87bc9b02376b382bae902052af9f.zip
opensim-SC_OLD-6820deed34fa87bc9b02376b382bae902052af9f.tar.gz
opensim-SC_OLD-6820deed34fa87bc9b02376b382bae902052af9f.tar.bz2
opensim-SC_OLD-6820deed34fa87bc9b02376b382bae902052af9f.tar.xz
Implement Scope ID lookup on GetLandData. Stacked regions were not handled
properly
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs68
1 files changed, 34 insertions, 34 deletions
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
1535 if (parcelID == UUID.Zero) 1535 if (parcelID == UUID.Zero)
1536 return; 1536 return;
1537 1537
1538 ExtendedLandData data = 1538 ExtendedLandData data = (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
1539 (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), 1539 delegate(string id)
1540 delegate(string id) 1540 {
1541 { 1541 UUID parcel = UUID.Zero;
1542 UUID parcel = UUID.Zero; 1542 UUID.TryParse(id, out parcel);
1543 UUID.TryParse(id, out parcel); 1543 // assume we've got the parcelID we just computed in RemoteParcelRequest
1544 // assume we've got the parcelID we just computed in RemoteParcelRequest 1544 ExtendedLandData extLandData = new ExtendedLandData();
1545 ExtendedLandData extLandData = new ExtendedLandData(); 1545 Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
1546 Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, 1546 out extLandData.X, out extLandData.Y);
1547 out extLandData.X, out extLandData.Y); 1547 m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
1548 m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", 1548 extLandData.RegionHandle, extLandData.X, extLandData.Y);
1549 extLandData.RegionHandle, extLandData.X, extLandData.Y); 1549
1550 1550 // for this region or for somewhere else?
1551 // for this region or for somewhere else? 1551 if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
1552 if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) 1552 {
1553 { 1553 extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData;
1554 extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; 1554 extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel;
1555 extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; 1555 }
1556 } 1556 else
1557 else 1557 {
1558 { 1558 ILandService landService = m_scene.RequestModuleInterface<ILandService>();
1559 ILandService landService = m_scene.RequestModuleInterface<ILandService>(); 1559 extLandData.LandData = landService.GetLandData(m_scene.RegionInfo.ScopeID,
1560 extLandData.LandData = landService.GetLandData(extLandData.RegionHandle, 1560 extLandData.RegionHandle,
1561 extLandData.X, 1561 extLandData.X,
1562 extLandData.Y, 1562 extLandData.Y,
1563 out extLandData.RegionAccess); 1563 out extLandData.RegionAccess);
1564 if (extLandData.LandData == null) 1564 if (extLandData.LandData == null)
1565 { 1565 {
1566 // we didn't find the region/land => don't cache 1566 // we didn't find the region/land => don't cache
1567 return null; 1567 return null;
1568 } 1568 }
1569 } 1569 }
1570 return extLandData; 1570 return extLandData;
1571 }); 1571 });
1572 1572
1573 if (data != null) // if we found some data, send it 1573 if (data != null) // if we found some data, send it
1574 { 1574 {