summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/order_gui.c b/order_gui.c
index adf4ab8bc..7fd02aeeb 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -17,6 +17,7 @@
#include "viewport.h"
#include "depot.h"
#include "waypoint.h"
+#include "train.h"
static int OrderGetSel(const Window* w)
{
@@ -282,9 +283,9 @@ static bool HandleOrderVehClick(const Vehicle* v, const Vehicle* u, Window* w)
{
if (u->type != v->type) return false;
- if (u->type == VEH_Train && u->subtype != TS_Front_Engine) {
+ if (u->type == VEH_Train && !IsFrontEngine(u)) {
u = GetFirstVehicleInChain(u);
- if (u->subtype != TS_Front_Engine) return false;
+ if (!IsFrontEngine(u)) return false;
}
// v is vehicle getting orders. Only copy/clone orders if vehicle doesn't have any orders yet