From 49cb8eb470a886dcfebd827dec1fcd8a55c2dffb Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 6 Mar 2006 20:28:28 +0000 Subject: (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends --- ai/default/default.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ai/default') diff --git a/ai/default/default.c b/ai/default/default.c index b0e0f0cc9..a92e8d1c2 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -3636,7 +3636,7 @@ pos_3: 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 @@ pos_3: 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); -- cgit v1.2.3-70-g09d2