comparison src/station_cmd.cpp @ 6133:49a563250135 draft

(svn r8875) -Fix Remove unnecessary EnsureNoVehicle() checks because they are - pointless per se (f.e. there are no vehicles on house tiles) - done again (f.e. using CMD_LANDSCAPE_CLEAR just a few lines later)
author tron <tron@openttd.org>
date Sat, 24 Feb 2007 06:46:20 +0000
parents 6def6ecb1bf7
children 7f92815712e4
comparison
equal deleted inserted replaced
6132:df7b080653c9 6133:49a563250135
1745 default: return_cmd_error(STR_304B_SITE_UNSUITABLE); 1745 default: return_cmd_error(STR_304B_SITE_UNSUITABLE);
1746 } 1746 }
1747 1747
1748 if (!(flags & DC_NO_TOWN_RATING) && !CheckIfAuthorityAllows(tile)) return CMD_ERROR; 1748 if (!(flags & DC_NO_TOWN_RATING) && !CheckIfAuthorityAllows(tile)) return CMD_ERROR;
1749 1749
1750 if (!EnsureNoVehicle(tile)) return CMD_ERROR;
1751
1752 cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); 1750 cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
1753 if (CmdFailed(cost)) return CMD_ERROR; 1751 if (CmdFailed(cost)) return CMD_ERROR;
1754 1752
1755 TileIndex tile_cur = tile + TileOffsByDiagDir(direction); 1753 TileIndex tile_cur = tile + TileOffsByDiagDir(direction);
1756
1757 if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR;
1758 1754
1759 if (!IsTileType(tile_cur, MP_WATER) || GetTileSlope(tile_cur, NULL) != SLOPE_FLAT) { 1755 if (!IsTileType(tile_cur, MP_WATER) || GetTileSlope(tile_cur, NULL) != SLOPE_FLAT) {
1760 return_cmd_error(STR_304B_SITE_UNSUITABLE); 1756 return_cmd_error(STR_304B_SITE_UNSUITABLE);
1761 } 1757 }
1762 1758