order_gui.c
changeset 2676 2ba71e034d97
parent 2668 54d9f9d4dca3
child 2725 5c632bc5be28
--- a/order_gui.c	Fri Nov 18 20:28:55 2005 +0000
+++ b/order_gui.c	Fri Nov 18 23:41:03 2005 +0000
@@ -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 @@
 {
 	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