From 6b97367ed03a69082e8f9ad15c5a04ff751bb3ff Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 26 Sep 2020 00:10:55 +0100 Subject: [PATCH] try to fix lm about on large regions, again... --- .../CoreModules/World/Land/LandManagementModule.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 45e234f81d..64569ed967 100755 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -2155,13 +2155,22 @@ namespace OpenSim.Region.CoreModules.World.Land 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; + if (wx >= info.RegionSizeX || wy >= info.RegionSizeY) + { + wx = x; + wy = y; + } if (info.RegionHandle == myHandle) { - ILandObject l = GetLandObjectClippedXY(x, y); + ILandObject l = GetLandObjectClippedXY(wx, wy); if (l != null) parcelID = l.LandData.FakeID; else - parcelID = Util.BuildFakeParcelID(myHandle, x, y); + parcelID = Util.BuildFakeParcelID(myHandle, wx, wy); } else {