From aa2c1ce4b078e5b54be7c1853ccd6a36c917b1e2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 6 Apr 2013 18:30:45 +0000 Subject: (svn r25152) -Fix-ish [FS#5520]: remove stray reservation from savegames affected by FS#5510 et al. upon loading --- src/saveload/afterload.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/saveload') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index a3837942c..91ba3a5e8 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2770,6 +2770,14 @@ bool AfterLoadGame() v->acceleration = avi->acceleration; } } + + /* Blocked tiles could be reserved due to a bug, which causes + * other places to assert upon e.g. station reconstruction. */ + for (TileIndex t = 0; t < map_size; t++) { + if (HasStationTileRail(t) && IsStationTileBlocked(t)) { + SetRailStationReservation(t, false); + } + } } /* Road stops is 'only' updating some caches */ -- cgit v1.2.3-70-g09d2