From 1032dbe1424e5bad1bc294b60dea91b737480613 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 28 Sep 2008 15:07:03 +0000 Subject: (svn r14411) -Fix (r14406): IsFrontEngine() is only valid for trains. --- src/autoreplace_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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)) { -- cgit v1.2.3-70-g09d2