diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 76ff6da..fdff61e 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -36,10 +36,12 @@ using OpenSim.Framework; | |||
36 | using OpenSim.Framework.Capabilities; | 36 | using OpenSim.Framework.Capabilities; |
37 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
38 | using OpenSim.Framework.Servers.HttpServer; | 38 | using OpenSim.Framework.Servers.HttpServer; |
39 | using OpenSim.Services.Interfaces; | ||
39 | using OpenSim.Region.Framework.Interfaces; | 40 | using OpenSim.Region.Framework.Interfaces; |
40 | using OpenSim.Region.Framework.Scenes; | 41 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Region.Physics.Manager; | 42 | using OpenSim.Region.Physics.Manager; |
42 | using Caps=OpenSim.Framework.Capabilities.Caps; | 43 | using Caps=OpenSim.Framework.Capabilities.Caps; |
44 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
43 | 45 | ||
44 | namespace OpenSim.Region.CoreModules.World.Land | 46 | namespace OpenSim.Region.CoreModules.World.Land |
45 | { | 47 | { |
@@ -1301,7 +1303,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1301 | else | 1303 | else |
1302 | { | 1304 | { |
1303 | // a parcel request for a parcel in another region. Ask the grid about the region | 1305 | // a parcel request for a parcel in another region. Ask the grid about the region |
1304 | RegionInfo info = m_scene.CommsManager.GridService.RequestNeighbourInfo(regionID); | 1306 | GridRegion info = m_scene.GridService.GetRegionByUUID(UUID.Zero, regionID); |
1305 | if (info != null) | 1307 | if (info != null) |
1306 | parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); | 1308 | parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y); |
1307 | } | 1309 | } |
@@ -1359,9 +1361,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1359 | } | 1361 | } |
1360 | else | 1362 | else |
1361 | { | 1363 | { |
1362 | extLandData.landData = m_scene.CommsManager.GridService.RequestLandData(extLandData.regionHandle, | 1364 | ILandService landService = m_scene.RequestModuleInterface<ILandService>(); |
1363 | extLandData.x, | 1365 | extLandData.landData = landService.GetLandData(extLandData.regionHandle, |
1364 | extLandData.y); | 1366 | extLandData.x, |
1367 | extLandData.y); | ||
1365 | if (extLandData.landData == null) | 1368 | if (extLandData.landData == null) |
1366 | { | 1369 | { |
1367 | // we didn't find the region/land => don't cache | 1370 | // we didn't find the region/land => don't cache |
@@ -1373,20 +1376,27 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1373 | 1376 | ||
1374 | if (data != null) // if we found some data, send it | 1377 | if (data != null) // if we found some data, send it |
1375 | { | 1378 | { |
1376 | RegionInfo info; | 1379 | GridRegion info; |
1377 | if (data.regionHandle == m_scene.RegionInfo.RegionHandle) | 1380 | if (data.regionHandle == m_scene.RegionInfo.RegionHandle) |
1378 | { | 1381 | { |
1379 | info = m_scene.RegionInfo; | 1382 | info = new GridRegion(m_scene.RegionInfo); |
1380 | } | 1383 | } |
1381 | else | 1384 | else |
1382 | { | 1385 | { |
1383 | // most likely still cached from building the extLandData entry | 1386 | // most likely still cached from building the extLandData entry |
1384 | info = m_scene.CommsManager.GridService.RequestNeighbourInfo(data.regionHandle); | 1387 | uint x = 0, y = 0; |
1388 | Utils.LongToUInts(data.regionHandle, out x, out y); | ||
1389 | info = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
1385 | } | 1390 | } |
1386 | // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. | 1391 | // we need to transfer the fake parcelID, not the one in landData, so the viewer can match it to the landmark. |
1387 | m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...", | 1392 | m_log.DebugFormat("[LAND] got parcelinfo for parcel {0} in region {1}; sending...", |
1388 | data.landData.Name, data.regionHandle); | 1393 | data.landData.Name, data.regionHandle); |
1389 | remoteClient.SendParcelInfo(info, data.landData, parcelID, data.x, data.y); | 1394 | // HACK for now |
1395 | RegionInfo r = new RegionInfo(); | ||
1396 | r.RegionName = info.RegionName; | ||
1397 | r.RegionLocX = (uint)info.RegionLocX; | ||
1398 | r.RegionLocY = (uint)info.RegionLocY; | ||
1399 | remoteClient.SendParcelInfo(r, data.landData, parcelID, data.x, data.y); | ||
1390 | } | 1400 | } |
1391 | else | 1401 | else |
1392 | m_log.Debug("[LAND] got no parcelinfo; not sending"); | 1402 | m_log.Debug("[LAND] got no parcelinfo; not sending"); |