summaryrefslogtreecommitdiff
path: root/src/ai/default/default.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-01-23 22:34:04 +0000
committersmatz <smatz@openttd.org>2008-01-23 22:34:04 +0000
commit5a7c9037709772e4678ee57d9b42f5332bd66f97 (patch)
treeae76a3390a465cf3bfc011e2b32d53d5ae55c298 /src/ai/default/default.cpp
parentb5641ae0f2ca3723af7fe7f68c4ac45e113e8421 (diff)
downloadopenttd-5a7c9037709772e4678ee57d9b42f5332bd66f97.tar.xz
(svn r11968) -Codechange: remove redundant FindLengthOfTunnel(), use GetTunnelBridgeLength() and/or GetOtherTunnelEnd() instead
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r--src/ai/default/default.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 2ea82bcda..49bd07fe9 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -31,6 +31,7 @@
#include "../../player_base.h"
#include "../../settings_type.h"
#include "default.h"
+#include "../../tunnelbridge.h"
#include "../../table/ai_rail.h"
@@ -2173,7 +2174,7 @@ static void AiBuildRailConstruct(Player *p)
if (arf.best_ptr[0] & 0x80) {
int i;
- int32 bridge_len = GetBridgeLength(arf.bridge_end_tile, _players_ai[p->index].cur_tile_a);
+ int32 bridge_len = GetTunnelBridgeLength(arf.bridge_end_tile, _players_ai[p->index].cur_tile_a);
/* Figure out which (rail)bridge type to build
* start with best bridge, then go down to worse and worse bridges
@@ -3065,7 +3066,7 @@ do_some_terraform:
int i;
int32 bridge_len;
_players_ai[p->index].cur_tile_a = arf.bridge_end_tile;
- bridge_len = GetBridgeLength(tile, _players_ai[p->index].cur_tile_a); // tile
+ bridge_len = GetTunnelBridgeLength(tile, _players_ai[p->index].cur_tile_a); // tile
/* Figure out what (road)bridge type to build
* start with best bridge, then go down to worse and worse bridges