mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r9743) -Fix [FS#598]: Stop flooded towns from building roads on water.
This commit is contained in:
parent
02e770ff2c
commit
469c04478a
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user