summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-09-05 10:15:23 +0000
committerbjarni <bjarni@openttd.org>2007-09-05 10:15:23 +0000
commit7cdf6d1cbe83bb28f56819abc40092f4d865c5ac (patch)
tree4c5c8c63ea8fbb514fa7bd1574862c409bf2efdc /src/vehicle.cpp
parent1028e2dc91d16bbaf837c74736968e52e3984f99 (diff)
downloadopenttd-7cdf6d1cbe83bb28f56819abc40092f4d865c5ac.tar.xz
(svn r11045) -Codechange: added a function to tell if a vehicle is the rear part of a dualheaded train engine
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}