Loading

Paste #pjv8ib4iq

  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. @@ -1234,6 +1236,7 @@
  16.  static TrackStatus GetTileTrackStatus_Water(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
  17.  {
  18.     static const byte coast_tracks[] = {0, 32, 4, 0, 16, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0};
  19. +   static const byte clear_tracks[] = {63, 32, 4, 0, 16, 0, 0, 8, 8, 0, 0, 16, 0, 4, 32, 0};
  20.  
  21.     TrackBits ts;
  22.  
  23. @@ -1240,7 +1243,7 @@
  24.     if (mode != TRANSPORT_WATER) return 0;
  25.  
  26.     switch (GetWaterTileType(tile)) {
  27. -       case WATER_TILE_CLEAR: ts = IsTileFlat(tile) ? TRACK_BIT_ALL : TRACK_BIT_NONE; break;
  28. +       case WATER_TILE_CLEAR: ts = (TrackBits)clear_tracks[GetTileSlope(tile) & 0xF]; break;
  29.         case WATER_TILE_COAST: ts = (TrackBits)coast_tracks[GetTileSlope(tile) & 0xF]; break;
  30.         case WATER_TILE_LOCK:  ts = DiagDirToDiagTrackBits(GetLockDirection(tile)); break;
  31.         case WATER_TILE_DEPOT: ts = AxisToTrackBits(GetShipDepotAxis(tile)); break;

Version history

Revision # Author Created at
pkap1qfo6 Anonymous 29 Mar 2016, 02:03:10 UTC Diff

Comments