diff options
author | maedhros <maedhros@openttd.org> | 2007-06-01 12:03:10 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-06-01 12:03:10 +0000 |
commit | 4acf3e4c3f4aebf66b82cc1d33aab221d27d800c (patch) | |
tree | ecdd71bd76175d9e15732fad8068a2c2abcb1de2 /src/depot_gui.cpp | |
parent | ab8503f5a5a377a38b6a0ce36a6170c4f83c6b37 (diff) | |
download | openttd-4acf3e4c3f4aebf66b82cc1d33aab221d27d800c.tar.xz |
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 8aea0298c..2d1cf1b41 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -488,10 +488,10 @@ static void HandleCloneVehClick(const Vehicle *v, const Window *w) if (v == NULL) return; - if (v->type == VEH_TRAIN && !IsFrontEngine(v)) { + if (v->HasFront() && !v->IsPrimaryVehicle()) { v = GetFirstVehicleInChain(v); /* Do nothing when clicking on a train in depot with no loc attached */ - if (!IsFrontEngine(v)) return; + if (v->type == VEH_TRAIN && !IsFrontEngine(v)) return; } switch (v->type) { |