Skip to content

Commit

Permalink
Fix #10395: When loading old saves, don't forcibly bar level crossings
Browse files Browse the repository at this point in the history
  • Loading branch information
2TallTyler committed Jan 23, 2023
1 parent 8aeef66 commit 6ce846d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/saveload/afterload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1985,13 +1985,6 @@ bool AfterLoadGame()
}
}

if (IsSavegameVersionBefore(SLV_102)) {
for (TileIndex t = 0; t < map_size; t++) {
/* Now all crossings should be in correct state */
if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false);
}
}

if (IsSavegameVersionBefore(SLV_103)) {
/* Non-town-owned roads now store the closest town */
UpdateNearestTownForRoadTiles(false);
Expand Down Expand Up @@ -3196,9 +3189,9 @@ bool AfterLoadGame()
}
}

/* Refresh all level crossings to bar adjacent crossing tiles. */
/* Refresh all level crossings to bar adjacent crossing tiles, if needed. */
for (TileIndex tile = 0; tile < Map::Size(); tile++) {
if (IsLevelCrossingTile(tile)) UpdateLevelCrossing(tile, false, true);
if (IsLevelCrossingTile(tile)) UpdateLevelCrossing(tile, false);
}
}

Expand Down

0 comments on commit 6ce846d

Please sign in to comment.