summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r--src/newgrf_station.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index d6dcba7b0..52c7c1edb 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -20,6 +20,7 @@
#include "newgrf_station.h"
#include "newgrf_spritegroup.h"
#include "newgrf_sound.h"
+#include "newgrf_railtype.h"
#include "town.h"
#include "newgrf_town.h"
#include "date_func.h"
@@ -442,7 +443,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
if (!HasBit(_svc.valid, 1)) { _svc.v41 = GetPlatformInfoHelper(tile, true, false, false); SetBit(_svc.valid, 1); }
return _svc.v41;
- case 0x42: return GetTerrainType(tile) | (GetRailType(tile) << 8);
+ case 0x42: return GetTerrainType(tile) | (GetReverseRailTypeTranslation(GetRailType(tile), object->u.station.statspec->grffile) << 8);
case 0x43: return st->owner; // Station owner
case 0x44: return HasStationReservation(tile) ? 7 : 4; // PBS status
case 0x45: