From 7cdf6d1cbe83bb28f56819abc40092f4d865c5ac Mon Sep 17 00:00:00 2001 From: bjarni Date: Wed, 5 Sep 2007 10:15:23 +0000 Subject: (svn r11045) -Codechange: added a function to tell if a vehicle is the rear part of a dualheaded train engine --- src/vehicle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index fc4b1ebff..44abc9f98 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -500,7 +500,7 @@ bool IsEngineCountable(const Vehicle *v) case VEH_AIRCRAFT: return IsNormalAircraft(v); // don't count plane shadows and helicopter rotors case VEH_TRAIN: return !IsArticulatedPart(v) && // tenders and other articulated parts - (!IsMultiheaded(v) || IsTrainEngine(v)); // rear parts of multiheaded engines + !IsRearDualheaded(v); // rear parts of multiheaded engines case VEH_ROAD: return IsRoadVehFront(v); case VEH_SHIP: return true; default: return false; // Only count player buildable vehicles @@ -1733,7 +1733,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) v = v_front; do { - if (v->type == VEH_TRAIN && IsMultiheaded(v) && !IsTrainEngine(v)) { + if (v->type == VEH_TRAIN && IsRearDualheaded(v)) { /* we build the rear ends of multiheaded trains with the front ones */ continue; } -- cgit v1.2.3-54-g00ecf