summaryrefslogtreecommitdiff
path: root/src/autoreplace_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-09-28 15:07:03 +0000
committerfrosch <frosch@openttd.org>2008-09-28 15:07:03 +0000
commit60e5d69ec456dbbbc7be515dce7da44d127bd8d6 (patch)
tree35ed672fd82dce19958d0d45402bac6699365441 /src/autoreplace_cmd.cpp
parentfc1ad6871490062dee9b0eb562a7d3552aeb5cba (diff)
downloadopenttd-60e5d69ec456dbbbc7be515dce7da44d127bd8d6.tar.xz
(svn r14411) -Fix (r14406): IsFrontEngine() is only valid for trains.
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 0cafcaf1d..f162f0d3f 100644
--- a/src/autoreplace_cmd.cpp
+++ b/src/autoreplace_cmd.cpp
@@ -93,7 +93,7 @@ bool CheckAutoreplaceValidity(EngineID from, EngineID to, PlayerID player)
*/
static void TransferCargo(Vehicle *old_veh, Vehicle *new_head, bool part_of_chain)
{
- assert(!part_of_chain || IsFrontEngine(new_head));
+ assert(!part_of_chain || new_head->IsPrimaryVehicle());
/* Loop through source parts */
for (Vehicle *src = old_veh; src != NULL; src = src->Next()) {
if (!part_of_chain && src->type == VEH_TRAIN && src != old_veh && src != old_veh->u.rail.other_multiheaded_part && !IsArticulatedPart(src)) {