diff options
author | maedhros <maedhros@openttd.org> | 2007-06-11 04:52:51 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-06-11 04:52:51 +0000 |
commit | 96a3a89c861648b44857b741b77b11b200d7b259 (patch) | |
tree | a860d571fe4e1e93e7f0507acb114ece1d9156cd /src/newgrf_commons.cpp | |
parent | 94200b63b807cd2f9c28bfae400ff5f49e524725 (diff) | |
download | openttd-96a3a89c861648b44857b741b77b11b200d7b259.tar.xz |
(svn r10089) -Fix (r10040): Use GetTileZ instead of GetClearGround in GetTerrainType as
GetTileZ is valid for any tile type. Also use GetTerrainType for stations.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 6c03de201..72567920e 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -7,7 +7,7 @@ #include "stdafx.h" #include "openttd.h" #include "variables.h" -#include "clear_map.h" +#include "landscape.h" #include "town.h" #include "industry.h" #include "newgrf.h" @@ -229,7 +229,7 @@ uint32 GetTerrainType(TileIndex tile) { switch (_opt.landscape) { case LT_TROPIC: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2; - case LT_ARCTIC: return (GetClearGround(tile) == CLEAR_SNOW) ? 4 : 0; + case LT_ARCTIC: return GetTileZ(tile) >= GetSnowLine() ? 4 : 0; default: return 0; } } |