summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-07-14 20:26:01 +0000
committerfrosch <frosch@openttd.org>2010-07-14 20:26:01 +0000
commit88dd0ac3af192e1ebfe9bcce24824582aa2abac8 (patch)
tree827182c7519288d5404fd6709ab933598ded736b /src
parent8439cf2f4cdc28cbda4e058eeac955c89cd0a48a (diff)
downloadopenttd-88dd0ac3af192e1ebfe9bcce24824582aa2abac8.tar.xz
(svn r20153) -Fix (r20125): Make the snowchecks for clear land and trees consistent with the other tiletypes.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_commons.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 821d1362d..cbf54a24a 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -291,7 +291,7 @@ uint32 GetTerrainType(TileIndex tile, bool upper_halftile)
bool has_snow;
switch (GetTileType(tile)) {
case MP_CLEAR:
- has_snow = IsSnowTile(tile);
+ has_snow = IsSnowTile(tile) && GetClearDensity(tile) >= 2;
break;
case MP_RAILWAY: {
@@ -306,7 +306,7 @@ uint32 GetTerrainType(TileIndex tile, bool upper_halftile)
case MP_TREES: {
TreeGround ground = GetTreeGround(tile);
- has_snow = (ground == TREE_GROUND_SNOW_DESERT || ground == TREE_GROUND_ROUGH_SNOW);
+ has_snow = (ground == TREE_GROUND_SNOW_DESERT || ground == TREE_GROUND_ROUGH_SNOW) && GetTreeDensity(tile) >= 2;
break;
}