(svn r10089) -Fix (r10040): Use GetTileZ instead of GetClearGround in GetTerrainType as

GetTileZ is valid for any tile type. Also use GetTerrainType for stations.
This commit is contained in:
maedhros
2007-06-11 04:52:51 +00:00
parent 94200b63b8
commit 96a3a89c86
2 changed files with 4 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
#include "stdafx.h"
#include "openttd.h"
#include "variables.h"
#include "clear_map.h"
#include "landscape.h"
#include "town.h"
#include "industry.h"
#include "newgrf.h"
@@ -229,7 +229,7 @@ uint32 GetTerrainType(TileIndex tile)
{
switch (_opt.landscape) {
case LT_TROPIC: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2;
case LT_ARCTIC: return (GetClearGround(tile) == CLEAR_SNOW) ? 4 : 0;
case LT_ARCTIC: return GetTileZ(tile) >= GetSnowLine() ? 4 : 0;
default: return 0;
}
}