viewport.c
changeset 2676 2ba71e034d97
parent 2662 42c11a1a0a4b
child 2710 e144188c1fdb
--- a/viewport.c	Fri Nov 18 20:28:55 2005 +0000
+++ b/viewport.c	Fri Nov 18 23:41:03 2005 +0000
@@ -19,6 +19,7 @@
 #include "signs.h"
 #include "waypoint.h"
 #include "variables.h"
+#include "train.h"
 
 #define VIEWPORT_DRAW_MEM (65536 * 2)
 
@@ -1700,7 +1701,7 @@
 
 static void SafeShowTrainViewWindow(const Vehicle* v)
 {
-  if (v->subtype != TS_Front_Engine) v = GetFirstVehicleInChain(v);
+  if (!IsFrontEngine(v)) v = GetFirstVehicleInChain(v);
   ShowTrainViewWindow(v);
 }