summaryrefslogtreecommitdiff
path: root/newgrf_station.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-06 09:43:38 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-06 09:43:38 +0000
commit9b7ac6acb669a7c6d8c91310bd6cc4dea4ba1e9f (patch)
treefde1bfbf42343ea5eb8f41388ee39e33992e323a /newgrf_station.c
parent3cdd2a637bf7b19e0aa87b9be46b1897b70832d8 (diff)
downloadopenttd-9b7ac6acb669a7c6d8c91310bd6cc4dea4ba1e9f.tar.xz
(svn r4749) - Newstations: add snowline support to variable 42.
Diffstat (limited to 'newgrf_station.c')
-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);