diff options
-rw-r--r-- | src/openttd.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index ffd30cf7b..9bd3bf7d0 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1317,6 +1317,23 @@ static void CheckCaches() st->goods[c].cargo.InvalidateCache(); assert(memcmp(&st->goods[c].cargo, buff, sizeof(StationCargoList)) == 0); } + + /* Check docking tiles */ + TileArea ta; + std::map<TileIndex, bool> docking_tiles; + TILE_AREA_LOOP(tile, st->docking_station) { + ta.Add(tile); + docking_tiles[tile] = IsDockingTile(tile); + } + UpdateStationDockingTiles(st); + if (ta.tile != st->docking_station.tile || ta.w != st->docking_station.w || ta.h != st->docking_station.h) { + DEBUG(desync, 2, "station docking mismatch: station %i, company %i", st->index, (int)st->owner); + } + TILE_AREA_LOOP(tile, ta) { + if (docking_tiles[tile] != IsDockingTile(tile)) { + DEBUG(desync, 2, "docking tile mismatch: tile %i", (int)tile); + } + } } } |