From f46d70ada5b0f81dbb134f9fe0d4c7d93a7e1b15 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 7 Jan 2017 12:18:44 +0000 Subject: try to work around some broken viewers math on handles --- .../Region/CoreModules/World/Land/LandManagementModule.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 3a8d6b7..0122f47 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -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) -- cgit v1.1