From b40b57776be36851aa6214612339318761118029 Mon Sep 17 00:00:00 2001
From: Robert Adams
Date: Tue, 24 Dec 2013 12:28:54 -0800
Subject: varregion: remove unused Scene.HaveNeighbor routine. Its computation
was wrong for large regions anyway.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 43 +-------------------------------
1 file changed, 1 insertion(+), 42 deletions(-)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3a5aa0f..10421ff 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1175,48 +1175,6 @@ namespace OpenSim.Region.Framework.Scenes
return found;
}
- ///
- /// Checks whether this region has a neighbour in the given direction.
- ///
- ///
- ///
- ///
- /// An integer which represents a compass point. N == 1, going clockwise until we reach NW == 8.
- /// Returns a positive integer if there is a region in that direction, a negative integer if not.
- ///
- public int HaveNeighbor(Cardinals car, ref int[] fix)
- {
- uint neighbourx = RegionInfo.RegionLocX;
- uint neighboury = RegionInfo.RegionLocY;
-
- int dir = (int)car;
-
- if (dir > 1 && dir < 5) //Heading East
- neighbourx++;
- else if (dir > 5) // Heading West
- neighbourx--;
-
- if (dir < 3 || dir == 8) // Heading North
- neighboury++;
- else if (dir > 3 && dir < 7) // Heading Sout
- neighboury--;
-
- // int x = (int)(neighbourx * Constants.RegionSize);
- // int y = (int)(neighboury * Constants.RegionSize);
- uint x = Util.RegionToWorldLoc(neighbourx);
- uint y = Util.RegionToWorldLoc(neighboury);
- GridRegion neighbourRegion = GridService.GetRegionByPosition(RegionInfo.ScopeID, (int)x, (int)y);
-
- if (neighbourRegion == null)
- {
- fix[0] = (int)(RegionInfo.RegionLocX - neighbourx);
- fix[1] = (int)(RegionInfo.RegionLocY - neighboury);
- return dir * (-1);
- }
- else
- return dir;
- }
-
// Alias IncomingHelloNeighbour OtherRegionUp, for now
public GridRegion IncomingHelloNeighbour(RegionInfo neighbour)
{
@@ -3917,6 +3875,7 @@ namespace OpenSim.Region.Framework.Scenes
{
Border crossedBorder = GetCrossedBorder(acd.startpos, Cardinals.E);
acd.startpos.X = crossedBorder.BorderLine.Z - 1;
+ m_log.DebugFormat("{0} NewUserConnection Adjusted border E. startpos={1}", LogHeader, acd.startpos);
}
if (TestBorderCross(acd.startpos, Cardinals.N))
--
cgit v1.1