diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-30 10:27:45 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-30 10:27:45 +0000 |
commit | 1268a70466a4dd16a8af5f191c3aeba41dae286f (patch) | |
tree | 22f875899541e51c8617d9f8deec54d43ce51599 /src/ai/default/default.cpp | |
parent | 6ee4ed8bf98872f74417226fa6cfa9a02c609a40 (diff) | |
download | openttd-1268a70466a4dd16a8af5f191c3aeba41dae286f.tar.xz |
(svn r12019) -Codechange: Add support for passenger engine designation for AI-use, NewGRF property 0x08 for trains.
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r-- | src/ai/default/default.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 957ba653e..7bddaa2cb 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -154,6 +154,9 @@ static EngineID AiChooseTrainToBuild(RailType railtype, Money money, byte flag, continue; } + /* Don't choose an engine designated for passenger use for freight. */ + if (rvi->ai_passenger_only != 0 && flag == 1) continue; + CommandCost ret = DoCommand(tile, i, 0, 0, CMD_BUILD_RAIL_VEHICLE); if (CmdSucceeded(ret) && ret.GetCost() <= money && rvi->ai_rank >= best_veh_score) { best_veh_score = rvi->ai_rank; |