try to work around some broken viewers math on handles

melanie
UbitUmarov 2017-01-07 12:18:44 +00:00
parent 7d3cd3dd59
commit f46d70ada5
1 changed files with 9 additions and 4 deletions

View File

@ -1818,13 +1818,20 @@ namespace OpenSim.Region.CoreModules.World.Land
uint wx;
uint wy;
Util.RegionHandleToWorldLoc(regionHandle, out wx, out wy);
wx += x;
wy += y;
GridRegion info = m_scene.GridService.GetRegionByPosition(scope, (int)wx, (int)wy);
if(info != null)
{
wx -= (uint)info.RegionLocX;
wy -= (uint)info.RegionLocY;
wx += x;
wy += y;
// Firestorm devs have no ideia how to do handlers math
// on all cases
if(wx > info.RegionSizeX || wy > info.RegionSizeY)
{
wx = x;
wy = y;
}
parcelID = Util.BuildFakeParcelID(info.RegionHandle, wx, wy);
}
}
@ -1845,8 +1852,6 @@ namespace OpenSim.Region.CoreModules.World.Land
parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
}
}
}
}
catch (LLSD.LLSDParseException e)