summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-07 10:41:45 +0000
committertron <tron@openttd.org>2005-02-07 10:41:45 +0000
commit7d56d1d84167e3bd1f9c8e0c6fff8412734adce9 (patch)
tree6fb9696d4610ea19244f194d0c47fa748af72fd4 /industry_cmd.c
parentc45312326a0ae8b7c64a67539b927d994b56681b (diff)
downloadopenttd-7d56d1d84167e3bd1f9c8e0c6fff8412734adce9.tar.xz
(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index f0acc8310..961f44499 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -959,7 +959,7 @@ static void PlantFarmField(uint tile)
int type, type2;
if (_opt.landscape == LT_HILLY) {
- if (GetTileZ(tile) >= (_opt.snow_line - 16))
+ if (GetTileZ(tile) + 16 >= _opt.snow_line)
return;
}
@@ -1169,7 +1169,7 @@ static bool CheckNewIndustry_NULL(uint tile, int type)
static bool CheckNewIndustry_Forest(uint tile, int type)
{
if (_opt.landscape == LT_HILLY) {
- if (GetTileZ(tile) < (_opt.snow_line + 16) ) {
+ if (GetTileZ(tile) < _opt.snow_line + 16U) {
_error_message = STR_4831_FOREST_CAN_ONLY_BE_PLANTED;
return false;
}
@@ -1202,7 +1202,7 @@ static bool CheckNewIndustry_Oilwell(uint tile, int type)
static bool CheckNewIndustry_Farm(uint tile, int type)
{
if (_opt.landscape == LT_HILLY) {
- if (GetTileZ(tile) >= (_opt.snow_line - 16)) {
+ if (GetTileZ(tile) + 16 >= _opt.snow_line) {
_error_message = STR_0239_SITE_UNSUITABLE;
return false;
}