diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 10:22:27 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 10:22:27 +0000 |
commit | 2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338 (patch) | |
tree | 9086d7e7b83871e60d43d838fd5f005ef50c5063 /src/tree_cmd.cpp | |
parent | a36551dbb4a6aa8a10e99df8331ac4ecb8586270 (diff) | |
download | openttd-2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338.tar.xz |
(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
Diffstat (limited to 'src/tree_cmd.cpp')
-rw-r--r-- | src/tree_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 4240c1eed..238f551c9 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -70,7 +70,7 @@ static bool CanPlantTreesOnTile(TileIndex tile, bool allow_desert) { switch (GetTileType(tile)) { case MP_WATER: - return !IsBridgeAbove(tile) && IsCoast(tile) && !IsSlopeWithOneCornerRaised(GetTilePixelSlope(tile, NULL)); + return !IsBridgeAbove(tile) && IsCoast(tile) && !IsSlopeWithOneCornerRaised(GetTileSlope(tile)); case MP_CLEAR: return !IsBridgeAbove(tile) && !IsClearGround(tile, CLEAR_FIELDS) && GetRawClearGround(tile) != CLEAR_ROCKS && @@ -363,7 +363,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 break; case MP_WATER: - if (!IsCoast(tile) || IsSlopeWithOneCornerRaised(GetTilePixelSlope(tile, NULL))) { + if (!IsCoast(tile) || IsSlopeWithOneCornerRaised(GetTileSlope(tile))) { msg = STR_ERROR_CAN_T_BUILD_ON_WATER; continue; } |