summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-06 20:28:28 +0000
committertron <tron@openttd.org>2006-03-06 20:28:28 +0000
commit2d3c28f2b3d24c2b01e54a51e2dcf5ad7f4851c8 (patch)
tree410be31dd2267cd8af3257b3d145965515575d34 /ai/default
parentfc1e9c5a92ccfeaea09b1fcd1bb58f1de4cb2644 (diff)
downloadopenttd-2d3c28f2b3d24c2b01e54a51e2dcf5ad7f4851c8.tar.xz
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c4
1 files changed, 2 insertions, 2 deletions
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);