From 74af65e556f6cedf4de72737fb27831f603953c4 Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 23 Jan 2008 22:34:04 +0000 Subject: (svn r11968) -Codechange: remove redundant FindLengthOfTunnel(), use GetTunnelBridgeLength() and/or GetOtherTunnelEnd() instead --- src/ai/default/default.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ai/default') 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 -- cgit v1.2.3-70-g09d2