diff options
author | rubidium <rubidium@openttd.org> | 2014-09-21 12:25:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-21 12:25:04 +0000 |
commit | c72d362840a4081cfcc27ab0807e42b5b6b4193f (patch) | |
tree | 5bfb4bde18527b771bf40ddb0656eb5b080e3f94 /src/terraform_cmd.cpp | |
parent | ddfc8372eeca8d5a3db3cd6a8e49c63f893b0330 (diff) | |
download | openttd-c72d362840a4081cfcc27ab0807e42b5b6b4193f.tar.xz |
(svn r26885) -Feature-ish: user interface for limiting the maximum height of a map
Diffstat (limited to 'src/terraform_cmd.cpp')
-rw-r--r-- | src/terraform_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index 82554d43e..2d36a101e 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -106,7 +106,7 @@ static CommandCost TerraformTileHeight(TerraformerState *ts, TileIndex tile, int /* Check range of destination height */ if (height < 0) return_cmd_error(STR_ERROR_ALREADY_AT_SEA_LEVEL); - if (height > (int)MAX_TILE_HEIGHT) return_cmd_error(STR_ERROR_TOO_HIGH); + if (height > _settings_game.construction.max_heightlevel) return_cmd_error(STR_ERROR_TOO_HIGH); /* * Check if the terraforming has any effect. @@ -360,7 +360,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 } /* Check range of destination height */ - if (h > MAX_TILE_HEIGHT) return_cmd_error((oldh == 0) ? STR_ERROR_ALREADY_AT_SEA_LEVEL : STR_ERROR_TOO_HIGH); + if (h > _settings_game.construction.max_heightlevel) return_cmd_error((oldh == 0) ? STR_ERROR_ALREADY_AT_SEA_LEVEL : STR_ERROR_TOO_HIGH); Money money = GetAvailableMoneyForCommand(); CommandCost cost(EXPENSES_CONSTRUCTION); |