(svn r9743) -Fix [FS#598]: Stop flooded towns from building roads on water.

This commit is contained in:
maedhros 2007-04-29 09:18:52 +00:00
parent 02e770ff2c
commit 469c04478a

View File

@ -951,7 +951,7 @@ static bool GrowTown(Town *t)
for (ptr = _town_coord_mod; ptr != endof(_town_coord_mod); ++ptr) { for (ptr = _town_coord_mod; ptr != endof(_town_coord_mod); ++ptr) {
/* Only work with plain land that not already has a house */ /* Only work with plain land that not already has a house */
if (!IsTileType(tile, MP_HOUSE) && GetTileSlope(tile, NULL) == SLOPE_FLAT) { if (!IsTileType(tile, MP_HOUSE) && GetTileSlope(tile, NULL) == SLOPE_FLAT) {
if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) { if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR))) {
DoCommand(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD); DoCommand(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD);
_current_player = old_player; _current_player = old_player;
return true; return true;