fix GetLandData(...) in land connectors not suporting large regions
parent
4ab9cfe711
commit
c17e337eca
|
@ -128,9 +128,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
|
||||||
|
uint rx = 0, ry = 0;
|
||||||
|
Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry);
|
||||||
|
|
||||||
foreach (Scene s in m_Scenes)
|
foreach (Scene s in m_Scenes)
|
||||||
{
|
{
|
||||||
if (s.RegionInfo.RegionHandle == regionHandle)
|
uint t = s.RegionInfo.WorldLocX;
|
||||||
|
if( rx < t)
|
||||||
|
continue;
|
||||||
|
t += s.RegionInfo.RegionSizeX;
|
||||||
|
if( rx >= t)
|
||||||
|
continue;
|
||||||
|
t = s.RegionInfo.WorldLocY;
|
||||||
|
if( ry < t)
|
||||||
|
continue;
|
||||||
|
t += s.RegionInfo.RegionSizeY;
|
||||||
|
if( ry < t)
|
||||||
{
|
{
|
||||||
m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from");
|
m_log.Debug("[LAND IN CONNECTOR]: Found region to GetLandData from");
|
||||||
regionAccess = s.RegionInfo.AccessLevel;
|
regionAccess = s.RegionInfo.AccessLevel;
|
||||||
|
|
|
@ -124,9 +124,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
|
||||||
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}",
|
||||||
regionHandle, x, y);
|
regionHandle, x, y);
|
||||||
|
|
||||||
|
uint rx = 0, ry = 0;
|
||||||
|
Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry);
|
||||||
|
|
||||||
foreach (Scene s in m_Scenes)
|
foreach (Scene s in m_Scenes)
|
||||||
{
|
{
|
||||||
if (s.RegionInfo.RegionHandle == regionHandle)
|
uint t = s.RegionInfo.WorldLocX;
|
||||||
|
if( rx < t)
|
||||||
|
continue;
|
||||||
|
t += s.RegionInfo.RegionSizeX;
|
||||||
|
if( rx >= t)
|
||||||
|
continue;
|
||||||
|
t = s.RegionInfo.WorldLocY;
|
||||||
|
if( ry < t)
|
||||||
|
continue;
|
||||||
|
t += s.RegionInfo.RegionSizeY;
|
||||||
|
if( ry < t)
|
||||||
{
|
{
|
||||||
LandData land = s.GetLandData(x, y);
|
LandData land = s.GetLandData(x, y);
|
||||||
regionAccess = s.RegionInfo.AccessLevel;
|
regionAccess = s.RegionInfo.AccessLevel;
|
||||||
|
|
Loading…
Reference in New Issue