Implement Scope ID lookup on GetLandData. Stacked regions were not handled

properly
This commit is contained in:
Melanie
2010-12-31 15:45:08 +01:00
parent 24a997eb7c
commit 6820deed34
8 changed files with 46 additions and 43 deletions

View File

@@ -64,7 +64,7 @@ namespace OpenSim.Services.Connectors
m_GridService = gridServices;
}
public virtual LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess)
public virtual LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
{
LandData landData = null;
Hashtable hash = new Hashtable();
@@ -80,7 +80,7 @@ namespace OpenSim.Services.Connectors
{
uint xpos = 0, ypos = 0;
Utils.LongToUInts(regionHandle, out xpos, out ypos);
GridRegion info = m_GridService.GetRegionByPosition(UUID.Zero, (int)xpos, (int)ypos);
GridRegion info = m_GridService.GetRegionByPosition(scopeID, (int)xpos, (int)ypos);
if (info != null) // just to be sure
{
XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);

View File

@@ -71,7 +71,7 @@ namespace OpenSim.Services.Connectors
{
uint x = 0, y = 0;
Utils.LongToUInts(regionHandle, out x, out y);
GridRegion regInfo = m_GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
GridRegion regInfo = m_GridService.GetRegionByPosition(thisRegion.ScopeID, (int)x, (int)y);
if ((regInfo != null) &&
// Don't remote-call this instance; that's a startup hickup
!((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort)))

View File

@@ -33,6 +33,6 @@ namespace OpenSim.Services.Interfaces
{
public interface ILandService
{
LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess);
LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess);
}
}