summaryrefslogtreecommitdiff
path: root/src/newgrf_spritegroup.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
commit48f2bf9bb1bd7b8859d3527c6c205386471cc4e4 (patch)
treea58aa837d70b430e5ab2ea0f71158e3b6032453b /src/newgrf_spritegroup.cpp
parent7812f7fd0ac617a9df41730e6770519154bc5344 (diff)
downloadopenttd-48f2bf9bb1bd7b8859d3527c6c205386471cc4e4.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_spritegroup.cpp')
-rw-r--r--src/newgrf_spritegroup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp
index fcde3cc28..7fba72c0f 100644
--- a/src/newgrf_spritegroup.cpp
+++ b/src/newgrf_spritegroup.cpp
@@ -4,6 +4,7 @@
#include "openttd.h"
#include "variables.h"
#include "macros.h"
+#include "landscape.h"
#include "oldpool.h"
#include "newgrf_callbacks.h"
#include "newgrf_spritegroup.h"
@@ -91,7 +92,7 @@ static inline uint32 GetVariable(const ResolverObject *object, byte variable, by
case 0x1A: return UINT_MAX;
case 0x1B: return GB(_display_opt, 0, 6);
case 0x1C: return object->last_value;
- case 0x20: return _opt.landscape == LT_HILLY ? _opt.snow_line : 0xFF;
+ case 0x20: return _opt.landscape == LT_HILLY ? GetSnowLine() : 0xFF;
/* Not a common variable, so evalute the feature specific variables */
default: return object->GetVariable(object, variable, parameter, available);