Index: src/water_cmd.cpp
===================================================================
--- src/water_cmd.cpp (revision 27196)
+++ src/water_cmd.cpp (working copy)
@@ -419,6 +419,7 @@
if (IsTileType(tile, MP_WATER) && (!IsTileOwner(tile, OWNER_WATER) || wc == WATER_CLASS_SEA)) continue;
bool water = IsWaterTile(tile);
+ bool river = HasTileWaterClass(tile) && GetWaterClass(tile) == WATER_CLASS_RIVER;
ret = DoCommand(tile, 0, 0, flags | DC_FORCE_CLEAR_TILE, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
@@ -442,6 +443,7 @@
/* FALL THROUGH */
default:
+ if (river) SB(_me[tile].m6, 0, 0, 1);
MakeCanal(tile, _current_company, Random());
if (Company::IsValidID(_current_company)) {
Company::Get(_current_company)->infrastructure.water++;
@@ -485,7 +487,7 @@
CommandCost ret = CheckTileOwnership(tile);
if (ret.Failed()) return ret;
}
-
+ bool river = HasBit(_me[tile].m6, 0);
if (flags & DC_EXEC) {
if (IsCanal(tile) && Company::IsValidID(owner)) {
Company::Get(owner)->infrastructure.water--;
@@ -492,9 +494,9 @@
DirtyCompanyInfrastructureWindows(owner);
}
DoClearSquare(tile);
+ if (river) MakeRiver(tile, Random());
MarkCanalsAndRiversAroundDirty(tile);
}
-
return CommandCost(EXPENSES_CONSTRUCTION, base_cost);
}