summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-03-20 13:47:00 +0000
committermaedhros <maedhros@openttd.org>2007-03-20 13:47:00 +0000
commit94db6aa1a2849167ba5100a5f3d6393007ec988b (patch)
treea58aa837d70b430e5ab2ea0f71158e3b6032453b /src/newgrf_house.cpp
parentad0b5de3da0a6ca375a344e2cbd79a3bc7c4137f (diff)
downloadopenttd-94db6aa1a2849167ba5100a5f3d6393007ec988b.tar.xz
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
by newgrf files. When this is enabled forests cannot be built below the highest snow line, and farms can't be built above it. Houses still use the _opt.snow_line so they are all consistent, so to make them respect the snowline you may want to use some newhouses features as well.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 707825341..888b5764f 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -8,6 +8,7 @@
#include "variables.h"
#include "debug.h"
#include "viewport.h"
+#include "landscape.h"
#include "date.h"
#include "town.h"
#include "town_map.h"
@@ -252,7 +253,7 @@ static uint32 GetTerrainType(TileIndex tile)
{
switch (_opt.landscape) {
case LT_DESERT: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2;
- case LT_HILLY: return GetTileZ(tile) >= _opt.snow_line ? 4 : 0;
+ case LT_HILLY: return GetTileZ(tile) >= GetSnowLine() ? 4 : 0;
default: return 0;
}
}