summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2010-02-07 22:22:54 +0000
committerpeter1138 <peter1138@openttd.org>2010-02-07 22:22:54 +0000
commit898e879bd90e34505cd7083acecf341fd798d02c (patch)
treef9c016c9dcb7d2e78726296e15aceb6adf4a0e2c /src/newgrf_station.cpp
parent01474412fc95b69ea6595a94eeb8baa0db575e16 (diff)
downloadopenttd-898e879bd90e34505cd7083acecf341fd798d02c.tar.xz
(svn r19056) -Add: [NewGRF] Action 3/2/1 (i.e. new graphics) support for rail types. (To be documented...)
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: