diff options
Diffstat (limited to 'viewport.c')
-rw-r--r-- | viewport.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/viewport.c b/viewport.c index c807a3965..71737ba26 100644 --- a/viewport.c +++ b/viewport.c @@ -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 CheckClickOnLandscape(const ViewPort *vp, int x, int y) static void SafeShowTrainViewWindow(const Vehicle* v) { - if (v->subtype != TS_Front_Engine) v = GetFirstVehicleInChain(v); + if (!IsFrontEngine(v)) v = GetFirstVehicleInChain(v); ShowTrainViewWindow(v); } |