summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
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/order_gui.cpp
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/order_gui.cpp')
-rw-r--r--src/order_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 6d9f8b19f..5d69639d8 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -320,9 +320,9 @@ static bool HandleOrderVehClick(const Vehicle *v, const Vehicle *u, Window *w)
{
if (u->type != v->type) return false;
- if (u->type == VEH_TRAIN && !IsFrontEngine(u)) {
+ if (u->HasFront() && !u->IsPrimaryVehicle()) {
u = GetFirstVehicleInChain(u);
- if (!IsFrontEngine(u)) return false;
+ if (!u->IsPrimaryVehicle()) return false;
}
// v is vehicle getting orders. Only copy/clone orders if vehicle doesn't have any orders yet