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 | 76c13beef0099a8e9677ddd10cb1a96aab1fb1ae (patch) | |
tree | a5059a021e78e1b38f75bcc8e8f01d6834a89b0f | |
parent | 67db5087cd472e0cf340c86b85d0c195e7c123cf (diff) | |
download | openttd-76c13beef0099a8e9677ddd10cb1a96aab1fb1ae.tar.xz |
(svn r14407) -Cleanup (r14406): Remove a redundant test. (thanks SmatZ)
-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) { |