(svn r20909) -Fix [FS#4137]: don't see coasts as water for object construction

This commit is contained in:
rubidium
2010-10-08 21:08:38 +00:00
parent 7e7107b3bb
commit d160ca90a1
2 changed files with 11 additions and 1 deletions

View File

@@ -166,7 +166,7 @@ CommandCost CmdBuildObject(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
bool allow_water = (spec->flags & (OBJECT_FLAG_BUILT_ON_WATER | OBJECT_FLAG_NOT_ON_LAND)) != 0;
bool allow_ground = (spec->flags & OBJECT_FLAG_NOT_ON_LAND) == 0;
TILE_AREA_LOOP(t, ta) {
if (HasTileWaterClass(t) && IsTileOnWater(t)) {
if (HasTileWaterClass(t) && IsTileOnWater(t) && !IsCoastTile(t)) {
if (!allow_water) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
if (!IsWaterTile(t)) {
/* Normal water tiles don't have to be cleared. For all other tile types clear