aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
1 files changed, 1 insertions, 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
1175 return found; 1175 return found;
1176 } 1176 }
1177 1177
1178 /// <summary>
1179 /// Checks whether this region has a neighbour in the given direction.
1180 /// </summary>
1181 /// <param name="car"></param>
1182 /// <param name="fix"></param>
1183 /// <returns>
1184 /// An integer which represents a compass point. N == 1, going clockwise until we reach NW == 8.
1185 /// Returns a positive integer if there is a region in that direction, a negative integer if not.
1186 /// </returns>
1187 public int HaveNeighbor(Cardinals car, ref int[] fix)
1188 {
1189 uint neighbourx = RegionInfo.RegionLocX;
1190 uint neighboury = RegionInfo.RegionLocY;
1191
1192 int dir = (int)car;
1193
1194 if (dir > 1 && dir < 5) //Heading East
1195 neighbourx++;
1196 else if (dir > 5) // Heading West
1197 neighbourx--;
1198
1199 if (dir < 3 || dir == 8) // Heading North
1200 neighboury++;
1201 else if (dir > 3 && dir < 7) // Heading Sout
1202 neighboury--;
1203
1204 // int x = (int)(neighbourx * Constants.RegionSize);
1205 // int y = (int)(neighboury * Constants.RegionSize);
1206 uint x = Util.RegionToWorldLoc(neighbourx);
1207 uint y = Util.RegionToWorldLoc(neighboury);
1208 GridRegion neighbourRegion = GridService.GetRegionByPosition(RegionInfo.ScopeID, (int)x, (int)y);
1209
1210 if (neighbourRegion == null)
1211 {
1212 fix[0] = (int)(RegionInfo.RegionLocX - neighbourx);
1213 fix[1] = (int)(RegionInfo.RegionLocY - neighboury);
1214 return dir * (-1);
1215 }
1216 else
1217 return dir;
1218 }
1219
1220 // Alias IncomingHelloNeighbour OtherRegionUp, for now 1178 // Alias IncomingHelloNeighbour OtherRegionUp, for now
1221 public GridRegion IncomingHelloNeighbour(RegionInfo neighbour) 1179 public GridRegion IncomingHelloNeighbour(RegionInfo neighbour)
1222 { 1180 {
@@ -3917,6 +3875,7 @@ namespace OpenSim.Region.Framework.Scenes
3917 { 3875 {
3918 Border crossedBorder = GetCrossedBorder(acd.startpos, Cardinals.E); 3876 Border crossedBorder = GetCrossedBorder(acd.startpos, Cardinals.E);
3919 acd.startpos.X = crossedBorder.BorderLine.Z - 1; 3877 acd.startpos.X = crossedBorder.BorderLine.Z - 1;
3878 m_log.DebugFormat("{0} NewUserConnection Adjusted border E. startpos={1}", LogHeader, acd.startpos);
3920 } 3879 }
3921 3880
3922 if (TestBorderCross(acd.startpos, Cardinals.N)) 3881 if (TestBorderCross(acd.startpos, Cardinals.N))