diff options
author | Melanie | 2010-12-31 15:45:08 +0100 |
---|---|---|
committer | Melanie | 2011-01-03 19:40:55 +0000 |
commit | 9971766256e422aeb320827a51f041f3b732575b (patch) | |
tree | 8c67cf611ec4e6844610567d89cb16b18c90d04b /OpenSim/Region | |
parent | Fix up a prior fix (refix the fixed fix :) (diff) | |
download | opensim-SC_OLD-9971766256e422aeb320827a51f041f3b732575b.zip opensim-SC_OLD-9971766256e422aeb320827a51f041f3b732575b.tar.gz opensim-SC_OLD-9971766256e422aeb320827a51f041f3b732575b.tar.bz2 opensim-SC_OLD-9971766256e422aeb320827a51f041f3b732575b.tar.xz |
Implement Scope ID lookup on GetLandData. Stacked regions were not handled
properly
Diffstat (limited to 'OpenSim/Region')
4 files changed, 42 insertions, 39 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs index 23251c9..fcc69e9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs | |||
@@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
37 | using OpenSim.Server.Base; | 37 | using OpenSim.Server.Base; |
38 | using OpenSim.Server.Handlers.Base; | 38 | using OpenSim.Server.Handlers.Base; |
39 | using OpenSim.Services.Interfaces; | 39 | using OpenSim.Services.Interfaces; |
40 | using OpenMetaverse; | ||
40 | 41 | ||
41 | 42 | ||
42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land | 43 | namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land |
@@ -121,7 +122,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land | |||
121 | 122 | ||
122 | #region ILandService | 123 | #region ILandService |
123 | 124 | ||
124 | public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) | 125 | public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess) |
125 | { | 126 | { |
126 | m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", | 127 | m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}", |
127 | regionHandle, m_Scenes.Count); | 128 | regionHandle, m_Scenes.Count); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs index e15f624..86c0b85 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs | |||
@@ -35,6 +35,7 @@ using OpenSim.Server.Base; | |||
35 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
36 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
37 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
38 | using OpenMetaverse; | ||
38 | 39 | ||
39 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | 40 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land |
40 | { | 41 | { |
@@ -116,7 +117,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | |||
116 | 117 | ||
117 | #region ILandService | 118 | #region ILandService |
118 | 119 | ||
119 | public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) | 120 | public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess) |
120 | { | 121 | { |
121 | regionAccess = 2; | 122 | regionAccess = 2; |
122 | m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}", | 123 | m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}", |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs index 252d9e7..766ef81 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs | |||
@@ -36,6 +36,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
36 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
37 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
38 | using OpenSim.Server.Base; | 38 | using OpenSim.Server.Base; |
39 | using OpenMetaverse; | ||
39 | 40 | ||
40 | 41 | ||
41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | 42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land |
@@ -109,13 +110,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | |||
109 | 110 | ||
110 | #region ILandService | 111 | #region ILandService |
111 | 112 | ||
112 | public override LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess) | 113 | public override LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess) |
113 | { | 114 | { |
114 | LandData land = m_LocalService.GetLandData(regionHandle, x, y, out regionAccess); | 115 | LandData land = m_LocalService.GetLandData(scopeID, regionHandle, x, y, out regionAccess); |
115 | if (land != null) | 116 | if (land != null) |
116 | return land; | 117 | return land; |
117 | 118 | ||
118 | return base.GetLandData(regionHandle, x, y, out regionAccess); | 119 | return base.GetLandData(scopeID, regionHandle, x, y, out regionAccess); |
119 | 120 | ||
120 | } | 121 | } |
121 | #endregion ILandService | 122 | #endregion ILandService |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ac4705c..8a309f1 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1510,40 +1510,40 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1510 | if (parcelID == UUID.Zero) | 1510 | if (parcelID == UUID.Zero) |
1511 | return; | 1511 | return; |
1512 | 1512 | ||
1513 | ExtendedLandData data = | 1513 | ExtendedLandData data = (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), |
1514 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), | 1514 | delegate(string id) |
1515 | delegate(string id) | 1515 | { |
1516 | { | 1516 | UUID parcel = UUID.Zero; |
1517 | UUID parcel = UUID.Zero; | 1517 | UUID.TryParse(id, out parcel); |
1518 | UUID.TryParse(id, out parcel); | 1518 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
1519 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1519 | ExtendedLandData extLandData = new ExtendedLandData(); |
1520 | ExtendedLandData extLandData = new ExtendedLandData(); | 1520 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
1521 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 1521 | out extLandData.X, out extLandData.Y); |
1522 | out extLandData.X, out extLandData.Y); | 1522 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
1523 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 1523 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
1524 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 1524 | |
1525 | 1525 | // for this region or for somewhere else? | |
1526 | // for this region or for somewhere else? | 1526 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
1527 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 1527 | { |
1528 | { | 1528 | extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; |
1529 | extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; | 1529 | extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; |
1530 | extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; | 1530 | } |
1531 | } | 1531 | else |
1532 | else | 1532 | { |
1533 | { | 1533 | ILandService landService = m_scene.RequestModuleInterface<ILandService>(); |
1534 | ILandService landService = m_scene.RequestModuleInterface<ILandService>(); | 1534 | extLandData.LandData = landService.GetLandData(m_scene.RegionInfo.ScopeID, |
1535 | extLandData.LandData = landService.GetLandData(extLandData.RegionHandle, | 1535 | extLandData.RegionHandle, |
1536 | extLandData.X, | 1536 | extLandData.X, |
1537 | extLandData.Y, | 1537 | extLandData.Y, |
1538 | out extLandData.RegionAccess); | 1538 | out extLandData.RegionAccess); |
1539 | if (extLandData.LandData == null) | 1539 | if (extLandData.LandData == null) |
1540 | { | 1540 | { |
1541 | // we didn't find the region/land => don't cache | 1541 | // we didn't find the region/land => don't cache |
1542 | return null; | 1542 | return null; |
1543 | } | 1543 | } |
1544 | } | 1544 | } |
1545 | return extLandData; | 1545 | return extLandData; |
1546 | }); | 1546 | }); |
1547 | 1547 | ||
1548 | if (data != null) // if we found some data, send it | 1548 | if (data != null) // if we found some data, send it |
1549 | { | 1549 | { |