ai/default/default.c
changeset 3153 301c1d71122b
parent 3144 426b825578f9
child 3179 774b1e6553a7
--- a/ai/default/default.c	Mon Mar 06 19:23:26 2006 +0000
+++ b/ai/default/default.c	Mon Mar 06 20:28:28 2006 +0000
@@ -3636,7 +3636,7 @@
 		if (IsLevelCrossing(tile)) goto is_rail_crossing;
 
 		if (GetRoadType(tile) == ROAD_DEPOT) {
-			uint dir;
+			DiagDirection dir;
 
 			// Check if there are any stations around.
 			if (IsTileType(tile + TileDiffXY(-1, 0), MP_STATION) &&
@@ -3664,7 +3664,7 @@
 			DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
 			DoCommandByTile(
 				TILE_MASK(tile + TileOffsByDir(dir)),
-				8 >> (dir ^ 2),
+				DiagDirToRoadBits(ReverseDiagDir(dir)),
 				0,
 				DC_EXEC,
 				CMD_REMOVE_ROAD);