summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 10:25:58 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 10:25:58 +0000
commit69162621d81c82b832cccc8d59179fc0e4472af2 (patch)
tree84b0875823153321225331b2a4a5862a60fdc345 /src/industry_cmd.cpp
parentb167c0a3967a62b4cbe98a12f2c4d932ee8df510 (diff)
downloadopenttd-69162621d81c82b832cccc8d59179fc0e4472af2.tar.xz
(svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index d9e28eb7e..2350ab3d3 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -979,7 +979,7 @@ static void SetupFarmFieldFence(TileIndex tile, int size, byte type, Axis direct
static void PlantFarmField(TileIndex tile, IndustryID industry)
{
if (_settings_game.game_creation.landscape == LT_ARCTIC) {
- if (GetTilePixelZ(tile) + TILE_HEIGHT * 2 >= GetSnowLine()) return;
+ if (GetTileZ(tile) + 2 >= GetSnowLine()) return;
}
/* determine field size */
@@ -1165,7 +1165,7 @@ static CommandCost CheckNewIndustry_NULL(TileIndex tile)
static CommandCost CheckNewIndustry_Forest(TileIndex tile)
{
if (_settings_game.game_creation.landscape == LT_ARCTIC) {
- if (GetTilePixelZ(tile) < HighestSnowLine() + TILE_HEIGHT * 2U) {
+ if (GetTileZ(tile) < HighestSnowLine() + 2U) {
return_cmd_error(STR_ERROR_FOREST_CAN_ONLY_BE_PLANTED);
}
}
@@ -1209,7 +1209,7 @@ static CommandCost CheckNewIndustry_OilRig(TileIndex tile)
static CommandCost CheckNewIndustry_Farm(TileIndex tile)
{
if (_settings_game.game_creation.landscape == LT_ARCTIC) {
- if (GetTilePixelZ(tile) + TILE_HEIGHT * 2 >= HighestSnowLine()) {
+ if (GetTileZ(tile) + 2 >= HighestSnowLine()) {
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
}
}