Implement Scope ID lookup on GetLandData. Stacked regions were not handled
properlyavinationmerge
parent
24a997eb7c
commit
6820deed34
|
@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Server.Base;
|
using OpenSim.Server.Base;
|
||||||
using OpenSim.Server.Handlers.Base;
|
using OpenSim.Server.Handlers.Base;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
|
namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
|
||||||
|
@ -121,7 +122,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
|
||||||
|
|
||||||
#region ILandService
|
#region ILandService
|
||||||
|
|
||||||
public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess)
|
public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}",
|
m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}",
|
||||||
regionHandle, m_Scenes.Count);
|
regionHandle, m_Scenes.Count);
|
||||||
|
|
|
@ -35,6 +35,7 @@ using OpenSim.Server.Base;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
||||||
{
|
{
|
||||||
|
@ -116,7 +117,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
||||||
|
|
||||||
#region ILandService
|
#region ILandService
|
||||||
|
|
||||||
public LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess)
|
public LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
|
||||||
{
|
{
|
||||||
regionAccess = 2;
|
regionAccess = 2;
|
||||||
m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}",
|
m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}",
|
||||||
|
|
|
@ -36,6 +36,7 @@ using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using OpenSim.Server.Base;
|
using OpenSim.Server.Base;
|
||||||
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
||||||
|
@ -109,13 +110,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
||||||
|
|
||||||
#region ILandService
|
#region ILandService
|
||||||
|
|
||||||
public override LandData GetLandData(ulong regionHandle, uint x, uint y, out byte regionAccess)
|
public override LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
|
||||||
{
|
{
|
||||||
LandData land = m_LocalService.GetLandData(regionHandle, x, y, out regionAccess);
|
LandData land = m_LocalService.GetLandData(scopeID, regionHandle, x, y, out regionAccess);
|
||||||
if (land != null)
|
if (land != null)
|
||||||
return land;
|
return land;
|
||||||
|
|
||||||
return base.GetLandData(regionHandle, x, y, out regionAccess);
|
return base.GetLandData(scopeID, regionHandle, x, y, out regionAccess);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion ILandService
|
#endregion ILandService
|
||||||
|
|
|
@ -1535,8 +1535,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (parcelID == UUID.Zero)
|
if (parcelID == UUID.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ExtendedLandData data =
|
ExtendedLandData data = (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
|
||||||
(ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
|
|
||||||
delegate(string id)
|
delegate(string id)
|
||||||
{
|
{
|
||||||
UUID parcel = UUID.Zero;
|
UUID parcel = UUID.Zero;
|
||||||
|
@ -1557,7 +1556,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ILandService landService = m_scene.RequestModuleInterface<ILandService>();
|
ILandService landService = m_scene.RequestModuleInterface<ILandService>();
|
||||||
extLandData.LandData = landService.GetLandData(extLandData.RegionHandle,
|
extLandData.LandData = landService.GetLandData(m_scene.RegionInfo.ScopeID,
|
||||||
|
extLandData.RegionHandle,
|
||||||
extLandData.X,
|
extLandData.X,
|
||||||
extLandData.Y,
|
extLandData.Y,
|
||||||
out extLandData.RegionAccess);
|
out extLandData.RegionAccess);
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace OpenSim.Server.Handlers.Land
|
||||||
m_log.DebugFormat("[LAND HANDLER]: Got request for land data at {0}, {1} for region {2}", x, y, regionHandle);
|
m_log.DebugFormat("[LAND HANDLER]: Got request for land data at {0}, {1} for region {2}", x, y, regionHandle);
|
||||||
|
|
||||||
byte regionAccess;
|
byte regionAccess;
|
||||||
LandData landData = m_LocalService.GetLandData(regionHandle, x, y, out regionAccess);
|
LandData landData = m_LocalService.GetLandData(UUID.Zero, regionHandle, x, y, out regionAccess);
|
||||||
Hashtable hash = new Hashtable();
|
Hashtable hash = new Hashtable();
|
||||||
if (landData != null)
|
if (landData != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace OpenSim.Services.Connectors
|
||||||
m_GridService = gridServices;
|
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;
|
LandData landData = null;
|
||||||
Hashtable hash = new Hashtable();
|
Hashtable hash = new Hashtable();
|
||||||
|
@ -80,7 +80,7 @@ namespace OpenSim.Services.Connectors
|
||||||
{
|
{
|
||||||
uint xpos = 0, ypos = 0;
|
uint xpos = 0, ypos = 0;
|
||||||
Utils.LongToUInts(regionHandle, out xpos, out ypos);
|
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
|
if (info != null) // just to be sure
|
||||||
{
|
{
|
||||||
XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
|
XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace OpenSim.Services.Connectors
|
||||||
{
|
{
|
||||||
uint x = 0, y = 0;
|
uint x = 0, y = 0;
|
||||||
Utils.LongToUInts(regionHandle, out x, out y);
|
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) &&
|
if ((regInfo != null) &&
|
||||||
// Don't remote-call this instance; that's a startup hickup
|
// Don't remote-call this instance; that's a startup hickup
|
||||||
!((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort)))
|
!((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort)))
|
||||||
|
|
|
@ -33,6 +33,6 @@ namespace OpenSim.Services.Interfaces
|
||||||
{
|
{
|
||||||
public interface ILandService
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue