summaryrefslogtreecommitdiff
path: root/src/autoreplace_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-07-07 15:35:28 +0000
committerfrosch <frosch@openttd.org>2012-07-07 15:35:28 +0000
commit22632d5e9ae1851e4e59788b6d70640b0d7de7ea (patch)
treef8f3df540c7d3efbf3ae8592a19fe7b9d5730a76 /src/autoreplace_cmd.cpp
parente0cf1e3e946e4fe84eae582c388b64f1d247d008 (diff)
downloadopenttd-22632d5e9ae1851e4e59788b6d70640b0d7de7ea.tar.xz
(svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon).
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r--src/autoreplace_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp
index 5ef230e64..95669a244 100644
--- a/src/autoreplace_cmd.cpp
+++ b/src/autoreplace_cmd.cpp
@@ -702,7 +702,7 @@ CommandCost CmdAutoreplaceVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1
if (!was_stopped) cost.AddCost(CmdStartStopVehicle(v, true));
if (cost.Failed()) return cost;
- assert(v->IsStoppedInDepot());
+ assert(free_wagon || v->IsStoppedInDepot());
/* We have to construct the new vehicle chain to test whether it is valid.
* Vehicle construction needs random bits, so we have to save the random seeds