Loading

Paste #px1itvjyb

  1. commit 20d052009ac9b23953cc83217f607adbfe66d9cc
  2. Author: peter1138 <peter1138@openttd.org>
  3. Date:   Mon Mar 11 10:38:16 2019 +0000
  4.  
  5.     Add: WIP Viewport debugging of docking tile
  6.  
  7. diff --git a/src/viewport.cpp b/src/viewport.cpp
  8. index 2cb3baa576..a0e5743432 100644
  9. --- a/src/viewport.cpp
  10. +++ b/src/viewport.cpp
  11. @@ -985,6 +985,8 @@ static void DrawTileSelection(const TileInfo *ti)
  12.         bool is_redsq = _thd.redsq == ti->tile;
  13.         if (is_redsq) DrawTileSelectionRect(ti, PALETTE_TILE_RED_PULSATING);
  14.  
  15. +       if (IsDockingTile(ti->tile)) DrawTileSelectionRect(ti, PALETTE_TILE_RED_PULSATING);
  16. +
  17.         /* No tile selection active? */
  18.         if ((_thd.drawstyle & HT_DRAG_MASK) == HT_NONE) return;
  19.  
  20. diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
  21. index 263d00c1ef..78be29f145 100644
  22. --- a/src/water_cmd.cpp
  23. +++ b/src/water_cmd.cpp
  24. @@ -194,12 +194,14 @@ void CheckForDockingTile(TileIndex t)
  25.                 if (IsDockTile(tile)) {
  26.                         Station::GetByTile(tile)->docking_station.Add(t);
  27.                         SetDockingTile(t, true);
  28. +                       MarkTileDirtyByTile(t);
  29.                 }
  30.                 if (IsTileType(tile, MP_INDUSTRY)) {
  31.                         Station *st = Industry::GetByTile(tile)->neutral_station;
  32.                         if (st != NULL) {
  33.                                 st->docking_station.Add(t);
  34.                                 SetDockingTile(t, true);
  35. +                               MarkTileDirtyByTile(t);
  36.                         }
  37.                 }
  38.         }

Comments