fix GetLandData(...) in land connectors not suporting large regions

LSLKeyTest
UbitUmarov 2016-08-20 01:59:40 +01:00
parent 4ab9cfe711
commit c17e337eca
2 changed files with 29 additions and 2 deletions

View File

@ -128,9 +128,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
{
m_log.DebugFormat("[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}",
regionHandle, m_Scenes.Count);
uint rx = 0, ry = 0;
Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry);
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");
regionAccess = s.RegionInfo.AccessLevel;

View File

@ -124,9 +124,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
m_log.DebugFormat("[LAND CONNECTOR]: request for land data in {0} at {1}, {2}",
regionHandle, x, y);
uint rx = 0, ry = 0;
Util.RegionHandleToWorldLoc(regionHandle, out rx, out ry);
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);
regionAccess = s.RegionInfo.AccessLevel;