Index: map_location.cpp
===================================================================
--- map_location.cpp	(revision 53725)
+++ map_location.cpp	(working copy)
@@ -219,9 +219,8 @@
 	// Impossible
 	assert(false);
 	return NDIRECTIONS;
-
-
 }
+
 map_location::DIRECTION map_location::get_opposite_dir(map_location::DIRECTION d) {
 	switch (d) {
 		case NORTH:
@@ -304,23 +303,16 @@
 
 void get_adjacent_tiles(const map_location& a, map_location* res)
 {
-	res->x = a.x;
-	res->y = a.y-1;
-	++res;
-	res->x = a.x+1;
-	res->y = a.y - (is_even(a.x) ? 1:0);
-	++res;
-	res->x = a.x+1;
-	res->y = a.y + (is_odd(a.x) ? 1:0);
-	++res;
-	res->x = a.x;
-	res->y = a.y+1;
-	++res;
-	res->x = a.x-1;
-	res->y = a.y + (is_odd(a.x) ? 1:0);
-	++res;
-	res->x = a.x-1;
-	res->y = a.y - (is_even(a.x) ? 1:0);
+  static const int shift_x[] = {0, 1, 1, 0, -1, -1};
+  static const int shift_y[2][6] = {{-1, 0, 1, 1, 1, 0}, // If a.x odd.
+                                    {-1, -1, 0, 1, 0, -1}}; // If a.x even.
+  
+  bool parity = is_even(a.x);
+  for(int i=0; i < 6; ++i, ++res)
+  {
+    res->x = a.x + shift_x[i];
+    res->y = a.y + shift_y[parity][i];
+  }
 }
