From 7f0201ffcaf6191ad25eac9288609e2cfa5c4e80 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 23 Aug 2015 04:48:44 +0100 Subject: fix region range compare --- OpenSim/Data/Null/NullRegionData.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/Null/NullRegionData.cs') diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index d28cd99..3e69394 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs @@ -140,7 +140,8 @@ namespace OpenSim.Data.Null { foreach (RegionData r in m_regionData.Values) { - if (r.posX == posX && r.posY == posY) + if (posX >= r.posX && posX < r.posX + r.sizeX + && posY >= r.posY && posY < r.posY + r.sizeY) ret.Add(r); } } @@ -176,8 +177,9 @@ namespace OpenSim.Data.Null { foreach (RegionData r in m_regionData.Values) { - if (r.posX >= startX && r.posX <= endX && r.posY >= startY && r.posY <= endY) - ret.Add(r); + if (r.posX + r.sizeX > startX && r.posX <= endX + && r.posY + r.sizeX > startY && r.posY <= endY) + ret.Add(r); } } -- cgit v1.1