Loading

Paste #pkap1qfo6

  1. Index: src/water_cmd.cpp
  2. ===================================================================
  3. --- src/water_cmd.cpp   (revision 27527)
  4. +++ src/water_cmd.cpp   (working copy)
  5. @@ -489,7 +489,9 @@
  6.                     Company::Get(owner)->infrastructure.water--;
  7.                     DirtyCompanyInfrastructureWindows(owner);
  8.                 }
  9. +               bool river = HasTileWaterClass(tile) && GetWaterClass(tile) == WATER_CLASS_RIVER;
  10.                 DoClearSquare(tile);
  11. +               if (river) MakeRiver(tile, Random());
  12.                 MarkCanalsAndRiversAroundDirty(tile);
  13.             }
  14.  
  15. @@ -1240,7 +1242,17 @@
  16.     if (mode != TRANSPORT_WATER) return 0;
  17.  
  18.     switch (GetWaterTileType(tile)) {
  19. -       case WATER_TILE_CLEAR: ts = IsTileFlat(tile) ? TRACK_BIT_ALL : TRACK_BIT_NONE; break;
  20. +       case WATER_TILE_CLEAR:
  21. +           if (IsTileFlat(tile)) ts = TRACK_BIT_ALL;
  22. +           if (GetTileSlope(tile) == SLOPE_W) ts = TRACK_BIT_RIGHT;
  23. +           if (GetTileSlope(tile) == SLOPE_S) ts = TRACK_BIT_UPPER;
  24. +           if (GetTileSlope(tile) == SLOPE_E) ts = TRACK_BIT_LEFT;
  25. +           if (GetTileSlope(tile) == SLOPE_N) ts = TRACK_BIT_LOWER;
  26. +           if (GetTileSlope(tile) == SLOPE_NWS) ts = TRACK_BIT_LEFT;
  27. +           if (GetTileSlope(tile) == SLOPE_WSE) ts = TRACK_BIT_LOWER;
  28. +           if (GetTileSlope(tile) == SLOPE_SEN) ts = TRACK_BIT_RIGHT;
  29. +           if (GetTileSlope(tile) == SLOPE_ENW) ts = TRACK_BIT_UPPER;
  30. +           break;
  31.         case WATER_TILE_COAST: ts = (TrackBits)coast_tracks[GetTileSlope(tile) & 0xF]; break;
  32.         case WATER_TILE_LOCK:  ts = DiagDirToDiagTrackBits(GetLockDirection(tile)); break;
  33.         case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;

Comments