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/industry_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/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index d60e3d6cb..d9e28eb7e 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1359,7 +1359,7 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil if (gfx == GFX_WATERTILE_SPECIALCHECK) { if (!IsTileType(cur_tile, MP_WATER) || - GetTilePixelSlope(cur_tile, NULL) != SLOPE_FLAT) { + GetTileSlope(cur_tile) != SLOPE_FLAT) { return_cmd_error(STR_ERROR_SITE_UNSUITABLE); } } else { @@ -1379,7 +1379,7 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil CommandCost ret = PerformIndustryTileSlopeCheck(tile, cur_tile, its, type, gfx, itspec_index, initial_random_bits, founder, creation_type); if (ret.Failed()) return ret; } else { - Slope tileh = GetTilePixelSlope(cur_tile, NULL); + Slope tileh = GetTileSlope(cur_tile); refused_slope |= IsSlopeRefused(tileh, its->slopes_refused); } @@ -2724,7 +2724,7 @@ static CommandCost TerraformTile_Industry(TileIndex tile, DoCommandFlag flags, u * - Allow autoslope by default. * - Disallow autoslope if callback succeeds and returns non-zero. */ - Slope tileh_old = GetTilePixelSlope(tile, NULL); + Slope tileh_old = GetTileSlope(tile); /* TileMaxZ must not be changed. Slopes must not be steep. */ if (!IsSteepSlope(tileh_old) && !IsSteepSlope(tileh_new) && (GetTileMaxPixelZ(tile) == z_new + GetSlopeMaxPixelZ(tileh_new))) { const IndustryGfx gfx = GetIndustryGfx(tile); |