* Found and fixed a situation where a neighbor region would come up send a notice and would be tagged as 'too far away' when it was right next door.

ThreadPoolClientBranch
Teravus Ovares 2008-01-20 05:51:38 +00:00
parent 4f9c7288cd
commit 64392b4fac
1 changed files with 6 additions and 2 deletions

View File

@ -335,8 +335,12 @@ namespace OpenSim.Region.Environment.Scenes
m_neighbours.Add(otherRegion); m_neighbours.Add(otherRegion);
} }
} }
if ((Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1) && // If these are cast to INT because long + negative values + abs returns invalid data
(Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1))
int resultX = Math.Abs((int)otherRegion.RegionLocX - (int)RegionInfo.RegionLocX);
int resultY = Math.Abs((int)otherRegion.RegionLocY - (int)RegionInfo.RegionLocY);
if ((resultX <= 1) &&
( resultY <= 1))
{ {
try try
{ {