summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-11-08 05:05:35 +0000
committerbelugas <belugas@openttd.org>2006-11-08 05:05:35 +0000
commit5f139b74e52e4aa03088316fa5a62c2b09ed8f73 (patch)
tree7192b16b972bc739a57805a481119e0ea20b8897
parent8786045eab03e0cec5847bf8d5cf8173bfde0811 (diff)
downloadopenttd-5f139b74e52e4aa03088316fa5a62c2b09ed8f73.tar.xz
(svn r7109) -Codechange: use map accessor IsClearWaterTile
-rw-r--r--industry_cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 1b7da62ab..14f8660b6 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -24,6 +24,7 @@
#include "table/build_industry.h"
#include "genworld.h"
#include "date.h"
+#include "water_map.h"
void ShowIndustryViewWindow(int industry);
void BuildOilRig(TileIndex tile);
@@ -1158,11 +1159,11 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
if (!EnsureNoVehicle(cur_tile)) return false;
if (type == IT_OIL_RIG) {
- if (!IsTileType(cur_tile, MP_WATER) || _m[cur_tile].m5 != 0) return false;
+ if (!IsClearWaterTile(cur_tile)) return false;
} else {
Slope tileh;
- if (IsTileType(cur_tile, MP_WATER) && _m[cur_tile].m5 == 0) return false;
+ if (IsClearWaterTile(cur_tile)) return false;
tileh = GetTileSlope(cur_tile, NULL);
if (IsSteepSlope(tileh)) return false;