Index: src/water_cmd.cpp
===================================================================
--- src/water_cmd.cpp (revision 27527)
+++ src/water_cmd.cpp (working copy)
@@ -489,7 +489,9 @@
Company::Get(owner)->infrastructure.water--;
DirtyCompanyInfrastructureWindows(owner);
}
+ bool river = HasTileWaterClass(tile) && GetWaterClass(tile) == WATER_CLASS_RIVER;
DoClearSquare(tile);
+ if (river) MakeRiver(tile, Random());
MarkCanalsAndRiversAroundDirty(tile);
}
@@ -1240,7 +1242,17 @@
if (mode != TRANSPORT_WATER) return 0;
switch (GetWaterTileType(tile)) {
- case WATER_TILE_CLEAR: ts = IsTileFlat(tile) ? TRACK_BIT_ALL : TRACK_BIT_NONE; break;
+ case WATER_TILE_CLEAR:
+ if (IsTileFlat(tile)) ts = TRACK_BIT_ALL;
+ if (GetTileSlope(tile) == SLOPE_W) ts = TRACK_BIT_RIGHT;
+ if (GetTileSlope(tile) == SLOPE_S) ts = TRACK_BIT_UPPER;
+ if (GetTileSlope(tile) == SLOPE_E) ts = TRACK_BIT_LEFT;
+ if (GetTileSlope(tile) == SLOPE_N) ts = TRACK_BIT_LOWER;
+ if (GetTileSlope(tile) == SLOPE_NWS) ts = TRACK_BIT_LEFT;
+ if (GetTileSlope(tile) == SLOPE_WSE) ts = TRACK_BIT_LOWER;
+ if (GetTileSlope(tile) == SLOPE_SEN) ts = TRACK_BIT_RIGHT;
+ if (GetTileSlope(tile) == SLOPE_ENW) ts = TRACK_BIT_UPPER;
+ break;
case WATER_TILE_COAST: ts = (TrackBits)coast_tracks[GetTileSlope(tile) & 0xF]; break;
case WATER_TILE_LOCK: ts = DiagDirToDiagTrackBits(GetLockDirection(tile)); break;
case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;