diff options
author | frosch <frosch@openttd.org> | 2008-09-27 17:08:03 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-09-27 17:08:03 +0000 |
commit | e8038cbf5856ad19ce0933ed08b4705c46cf49f4 (patch) | |
tree | a5059a021e78e1b38f75bcc8e8f01d6834a89b0f /src | |
parent | 32289ebd637c84127281c0aea6068577f8966f93 (diff) | |
download | openttd-e8038cbf5856ad19ce0933ed08b4705c46cf49f4.tar.xz |
(svn r14407) -Cleanup (r14406): Remove a redundant test. (thanks SmatZ)
Diffstat (limited to 'src')
-rw-r--r-- | src/autoreplace_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 227ba19a4..0cafcaf1d 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -382,10 +382,8 @@ static CommandCost ReplaceFreeUnit(Vehicle **single_unit, uint32 flags, bool *no *single_unit = new_v; } - if (cost.Succeeded()) { - /* Sell the old vehicle */ - cost.AddCost(DoCommand(0, old_v->index, 0, flags, GetCmdSellVeh(old_v))); - } + /* Sell the old vehicle */ + cost.AddCost(DoCommand(0, old_v->index, 0, flags, GetCmdSellVeh(old_v))); /* If we are not in DC_EXEC undo everything */ if ((flags & DC_EXEC) == 0) { |