summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-06-01 12:03:10 +0000
committermaedhros <maedhros@openttd.org>2007-06-01 12:03:10 +0000
commit4acf3e4c3f4aebf66b82cc1d33aab221d27d800c (patch)
treeecdd71bd76175d9e15732fad8068a2c2abcb1de2 /src/train.h
parentab8503f5a5a377a38b6a0ce36a6170c4f83c6b37 (diff)
downloadopenttd-4acf3e4c3f4aebf66b82cc1d33aab221d27d800c.tar.xz
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train.h b/src/train.h
index 964ca446d..3d09d4cea 100644
--- a/src/train.h
+++ b/src/train.h
@@ -270,6 +270,8 @@ struct Train : public Vehicle {
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; }
WindowClass GetVehicleListWindowClass() const { return WC_TRAINS_LIST; }
void PlayLeaveStationSound() const;
+ bool IsPrimaryVehicle() const { return IsFrontEngine(this); }
+ bool HasFront() const { return true; }
};
#endif /* TRAIN_H */