From e63634d3321a3969b295c8ef02ba8403b4c0a09a Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 6 May 2006 09:43:38 +0000 Subject: (svn r4749) - Newstations: add snowline support to variable 42. --- newgrf_station.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2