diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ac4705c..4f8e205 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 | { |
@@ -1557,7 +1557,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1557 | // most likely still cached from building the extLandData entry | 1557 | // most likely still cached from building the extLandData entry |
1558 | uint x = 0, y = 0; | 1558 | uint x = 0, y = 0; |
1559 | Utils.LongToUInts(data.RegionHandle, out x, out y); | 1559 | Utils.LongToUInts(data.RegionHandle, out x, out y); |
1560 | info = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | 1560 | info = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y); |
1561 | } | 1561 | } |
1562 | // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. | 1562 | // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. |
1563 | m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...", | 1563 | m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...", |