aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f327b2b..76f6c60 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -335,8 +335,12 @@ namespace OpenSim.Region.Environment.Scenes
335 m_neighbours.Add(otherRegion); 335 m_neighbours.Add(otherRegion);
336 } 336 }
337 } 337 }
338 if ((Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1) && 338 // If these are cast to INT because long + negative values + abs returns invalid data
339 (Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1)) 339
340 int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
341 int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
342 if ((resultX <= 1) &&
343 ( resultY <= 1))
340 { 344 {
341 try 345 try
342 { 346 {