fix region range compare

avinationmerge
UbitUmarov 2015-08-23 04:48:44 +01:00
parent 24a093035b
commit 7f0201ffca
1 changed files with 5 additions and 3 deletions

View File

@ -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,7 +177,8 @@ namespace OpenSim.Data.Null
{
foreach (RegionData r in m_regionData.Values)
{
if (r.posX >= startX && r.posX <= endX && r.posY >= startY && r.posY <= endY)
if (r.posX + r.sizeX > startX && r.posX <= endX
&& r.posY + r.sizeX > startY && r.posY <= endY)
ret.Add(r);
}
}