diff options
author | smatz <smatz@openttd.org> | 2008-01-23 22:34:04 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-01-23 22:34:04 +0000 |
commit | 74af65e556f6cedf4de72737fb27831f603953c4 (patch) | |
tree | ae76a3390a465cf3bfc011e2b32d53d5ae55c298 /src/ai/default | |
parent | dbd4d7d6a8a4449cf1939752331a95c15ad276f9 (diff) | |
download | openttd-74af65e556f6cedf4de72737fb27831f603953c4.tar.xz |
(svn r11968) -Codechange: remove redundant FindLengthOfTunnel(), use GetTunnelBridgeLength() and/or GetOtherTunnelEnd() instead
Diffstat (limited to 'src/ai/default')
-rw-r--r-- | src/ai/default/default.cpp | 5 |
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 |