diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-06 09:43:38 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-06 09:43:38 +0000 |
commit | e63634d3321a3969b295c8ef02ba8403b4c0a09a (patch) | |
tree | fde1bfbf42343ea5eb8f41388ee39e33992e323a | |
parent | b7e0ca44531de504797e2eb9c7e77c678ebbbd43 (diff) | |
download | openttd-e63634d3321a3969b295c8ef02ba8403b4c0a09a.tar.xz |
(svn r4749) - Newstations: add snowline support to variable 42.
-rw-r--r-- | newgrf_station.c | 4 |
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); |