diff src/newgrf_station.cpp @ 6343:f75b72d9fc98 draft

(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.
author maedhros <maedhros@openttd.org>
date Tue, 20 Mar 2007 13:47:00 +0000
parents 57363e064324
children bcf98ba27bbf
line wrap: on
line diff
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -6,6 +6,7 @@
 #include "openttd.h"
 #include "variables.h"
 #include "functions.h"
+#include "landscape.h"
 #include "debug.h"
 #include "sprite.h"
 #include "table/sprites.h"
@@ -370,7 +371,7 @@
 		case 0x40: return GetPlatformInfoHelper(tile, false, false, false);
 		case 0x41: return GetPlatformInfoHelper(tile, true,  false, false);
 		case 0x42: /* Terrain and rail type */
-			return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > _opt.snow_line) ? 4 : 0) |
+			return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) |
 			       (_opt.landscape == LT_DESERT ? GetTropicZone(tile) : 0) |
 			       (GetRailType(tile) << 8);
 		case 0x43: return st->owner; /* Station owner */