summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newgrf_station.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/newgrf_station.c b/newgrf_station.c
index bcef53692..d15af4bf2 100644
--- a/newgrf_station.c
+++ b/newgrf_station.c
@@ -307,7 +307,9 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
/* Calculated station variables */
case 0x40: return GetPlatformInfoHelper(tile, false, false, false);
case 0x41: return GetPlatformInfoHelper(tile, true, false, false);
- case 0x42: return GetRailType(tile) << 8; /* Rail type */
+ case 0x42: /* Terrain and rail type */
+ return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > _opt.snow_line) ? 4 : 0) |
+ (GetRailType(tile) << 8);
case 0x43: return st->owner; /* Station owner */
case 0x44: return 2; /* PBS status */
case 0x46: return GetPlatformInfoHelper(tile, false, false, true);