Codechange: make use of Tile in for all direct map accesses

This commit is contained in:
Rubidium
2023-01-21 16:40:28 +01:00
committed by rubidium42
parent 7a6452d3ef
commit 580d0a6343
30 changed files with 963 additions and 946 deletions

View File

@@ -91,9 +91,10 @@ void MoveBuoysToWaypoints()
if (train) {
/* When we make a rail waypoint of the station, convert the map as well. */
for (TileIndex t : train_st) {
if (!IsTileType(t, MP_STATION) || GetStationIndex(t) != index) continue;
Tile tile(t);
if (!IsTileType(tile, MP_STATION) || GetStationIndex(tile) != index) continue;
SB(_me[t].m6, 3, 3, STATION_WAYPOINT);
SB(tile.m6(), 3, 3, STATION_WAYPOINT);
wp->rect.BeforeAddTile(t, StationRect::ADD_FORCE);
}