diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 3dc049b3fa..99d4944b52 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL foreach (RegionData r in dbret) { if (r.posX + r.sizeX > startX && r.posX <= endX - && r.posY + r.sizeX > startY && r.posY <= endY) + && r.posY + r.sizeY > startY && r.posY <= endY) ret.Add(r); } return ret; diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs index 3924b7bba1..fc352c3905 100644 --- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs +++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs @@ -211,7 +211,7 @@ namespace OpenSim.Data.PGSQL foreach (RegionData r in dbret) { if (r.posX + r.sizeX > startX && r.posX <= endX - && r.posY + r.sizeX > startY && r.posY <= endY) + && r.posY + r.sizeY > startY && r.posY <= endY) ret.Add(r); } return ret;