diff options
author | tron <tron@openttd.org> | 2006-03-12 16:13:16 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-12 16:13:16 +0000 |
commit | 12d252d9bd7ffee83c4be5162cd506bda1070020 (patch) | |
tree | 3d2526e7f2638131186fe93a08829d1bf29f22b5 /ai | |
parent | 78083f0da7b7c94eccea15eec397e2afe96da1d5 (diff) | |
download | openttd-12d252d9bd7ffee83c4be5162cd506bda1070020.tar.xz |
(svn r3831) Add and use GetRailDepotDirection()
Diffstat (limited to 'ai')
-rw-r--r-- | ai/default/default.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ai/default/default.c b/ai/default/default.c index 41580720c..7ba7fb137 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -4,6 +4,7 @@ #include "../../openttd.h" #include "../../functions.h" #include "../../map.h" +#include "../../rail_map.h" #include "../../road_map.h" #include "../../tile.h" #include "../../player.h" @@ -3625,8 +3626,9 @@ pos_3: } else { static const byte _depot_bits[] = {0x19,0x16,0x25,0x2A}; - m5 &= 3; - if (GetRailTrackStatus(tile + TileOffsByDir(m5)) & _depot_bits[m5]) + DiagDirection dir = GetRailDepotDirection(tile); + + if (GetRailTrackStatus(tile + TileOffsByDir(dir)) & _depot_bits[dir]) return; DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR); |