summaryrefslogtreecommitdiff
path: root/src/clear_map.h
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-05 22:32:47 +0000
committeryexo <yexo@openttd.org>2010-01-05 22:32:47 +0000
commit06842771a8f3a778ec519725dd4f9eeff4dbc220 (patch)
treed08cf8711b3eed11069498deb10a66a12a159cec /src/clear_map.h
parent3157dfb6754417092e99520b3c24a46f132260fa (diff)
downloadopenttd-06842771a8f3a778ec519725dd4f9eeff4dbc220.tar.xz
(svn r18738) -Fix (r18719): when a tree died while there was snow the amount of snow on the tile changed
Diffstat (limited to 'src/clear_map.h')
-rw-r--r--src/clear_map.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clear_map.h b/src/clear_map.h
index 0177e5f7f..f5c9271d2 100644
--- a/src/clear_map.h
+++ b/src/clear_map.h
@@ -310,14 +310,14 @@ static inline void MakeField(TileIndex t, uint field_type, IndustryID industry)
* @param t the tile to make snowy
* @pre GetClearGround(t) != CLEAR_SNOW
*/
-static inline void MakeSnow(TileIndex t)
+static inline void MakeSnow(TileIndex t, uint density = 0)
{
assert(GetClearGround(t) != CLEAR_SNOW);
SetBit(_m[t].m3, 4);
if (GetClearGround(t) == CLEAR_FIELDS) {
- SetClearGroundDensity(t, CLEAR_GRASS, 0);
+ SetClearGroundDensity(t, CLEAR_GRASS, density);
} else {
- SetClearDensity(t, 0);
+ SetClearDensity(t, density);
}
}