summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-10 10:52:19 +0000
committerrubidium <rubidium@openttd.org>2007-06-10 10:52:19 +0000
commit47d7124207e1674a2b6a900533a650a23c502b19 (patch)
tree0736d9d7bc7a66896036459ed38ae35114292848 /src/ai/default
parente1b7b7aecc1b750bb2cc3c792d8c4898ebafe6c7 (diff)
downloadopenttd-47d7124207e1674a2b6a900533a650a23c502b19.tar.xz
(svn r10081) -Fix [FS851]: towns/AIs didn't build bridges anymore (boekabart).
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index d1435b6a8..3dca2825b 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -2888,7 +2888,7 @@ static inline void AiCheckBuildRoadBridgeHere(AiRoadFinder *arf, TileIndex tile,
}
// Is building a (rail)bridge possible at this place (type doesn't matter)?
- if (CmdFailed(DoCommand(tile_new, tile, 0x8000, DC_AUTO, CMD_BUILD_BRIDGE)))
+ if (CmdFailed(DoCommand(tile_new, tile, ((0x80 | ROADTYPES_ROAD) << 8), DC_AUTO, CMD_BUILD_BRIDGE)))
return;
AiBuildRoadRecursive(arf, tile_new, dir2);
@@ -3038,13 +3038,13 @@ do_some_terraform:
*/
for (i = 10; i != 0; i--) {
if (CheckBridge_Stuff(i, bridge_len)) {
- int32 cost = DoCommand(tile, p->ai.cur_tile_a, i + (0x80 << 8), DC_AUTO, CMD_BUILD_BRIDGE);
+ int32 cost = DoCommand(tile, p->ai.cur_tile_a, i + ((0x80 | ROADTYPES_ROAD) << 8), DC_AUTO, CMD_BUILD_BRIDGE);
if (!CmdFailed(cost) && cost < (p->player_money >> 5)) break;
}
}
// Build it
- DoCommand(tile, p->ai.cur_tile_a, i + (0x80 << 8), DC_AUTO | DC_EXEC, CMD_BUILD_BRIDGE);
+ DoCommand(tile, p->ai.cur_tile_a, i + ((0x80 | ROADTYPES_ROAD) << 8), DC_AUTO | DC_EXEC, CMD_BUILD_BRIDGE);
p->ai.state_counter = 0;
} else if (arf.best_ptr[0] & 0x40) {