summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
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 cb975f731..28beec471 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -6,6 +6,7 @@
#include "openttd.h"
#include "variables.h"
#include "functions.h"
+#include "landscape.h"
#include "debug.h"
#include "sprite.h"
#include "table/sprites.h"
@@ -370,7 +371,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
case 0x40: return GetPlatformInfoHelper(tile, false, false, false);
case 0x41: return GetPlatformInfoHelper(tile, true, false, false);
case 0x42: /* Terrain and rail type */
- return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > _opt.snow_line) ? 4 : 0) |
+ return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) |
(_opt.landscape == LT_DESERT ? GetTropicZone(tile) : 0) |
(GetRailType(tile) << 8);
case 0x43: return st->owner; /* Station owner */