(svn r14411) -Fix (r14406): IsFrontEngine() is only valid for trains.
authorfrosch
Sun, 28 Sep 2008 15:07:03 +0000
changeset 10198 75f7455a4d4a
parent 10197 fa185196aef1
child 10199 3bb560dd3cf6
(svn r14411) -Fix (r14406): IsFrontEngine() is only valid for trains.
src/autoreplace_cmd.cpp
--- a/src/autoreplace_cmd.cpp	Sun Sep 28 13:50:11 2008 +0000
+++ b/src/autoreplace_cmd.cpp	Sun Sep 28 15:07:03 2008 +0000
@@ -93,7 +93,7 @@
  */
 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)) {