(svn r12029) -Feature: Allow trees on shore.

This commit is contained in:
frosch
2008-01-31 17:54:13 +00:00
parent 90ee6a16ab
commit 23e6411fb7
7 changed files with 106 additions and 41 deletions

View File

@@ -15,6 +15,7 @@
#include "tile_map.h"
#include "station_map.h"
#include "settings_type.h"
#include "tree_map.h"
/** Constructor of generic class
* @param offset end of original data for this entity. i.e: houses = 110
@@ -296,6 +297,9 @@ uint32 GetNearbyTileInformation(TileIndex tile)
{
TileType tile_type = GetTileType(tile);
/* Fake tile type for trees on shore */
if (IsTileType(tile, MP_TREES) && GetTreeGround(tile) == TREE_GROUND_SHORE) tile_type = MP_WATER;
uint z;
Slope tileh = GetTileSlope(tile, &z);
byte terrain_type = GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;