summaryrefslogtreecommitdiff
path: root/ai/default/default.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-12 15:04:03 +0000
committertron <tron@openttd.org>2006-03-12 15:04:03 +0000
commit78083f0da7b7c94eccea15eec397e2afe96da1d5 (patch)
treefa4485d2814de5612a416a86e22ba7d60ce70f9f /ai/default/default.c
parentb394f72fa9305094ddf672564a0f4a0c8f16e89b (diff)
downloadopenttd-78083f0da7b7c94eccea15eec397e2afe96da1d5.tar.xz
(svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
Diffstat (limited to 'ai/default/default.c')
-rw-r--r--ai/default/default.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index f6e6cdbde..41580720c 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -7,6 +7,7 @@
#include "../../road_map.h"
#include "../../tile.h"
#include "../../player.h"
+#include "../../tunnel_map.h"
#include "../../vehicle.h"
#include "../../engine.h"
#include "../../command.h"
@@ -2147,7 +2148,7 @@ static bool AiRemoveTileAndGoForward(Player *p)
TileIndex tilenew;
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
- if (!(_m[tile].m5 & 0x80)) {
+ if (IsTunnel(tile)) {
// Clear the tunnel and continue at the other side of it.
if (CmdFailed(DoCommandByTile(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR)))
return false;