From 060cac439c721ccee04778cf7b1bfae463d5875f Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 13 Feb 2012 17:18:20 +0000 Subject: (svn r23942) -Fix: infrastructure cache of standard road stops would get messed up when buying a company with them --- src/saveload/afterload.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/saveload') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index f2a7c31a6..7cb9f0ff0 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2722,6 +2722,16 @@ bool AfterLoadGame() } } + /* The road owner of standard road stops was not properly accounted for. */ + if (IsSavegameVersionBefore(172)) { + for (TileIndex t = 0; t < map_size; t++) { + if (!IsStandardRoadStopTile(t)) continue; + Owner o = GetTileOwner(t); + SetRoadOwner(t, ROADTYPE_ROAD, o); + SetRoadOwner(t, ROADTYPE_TRAM, o); + } + } + /* Road stops is 'only' updating some caches */ AfterLoadRoadStops(); AfterLoadLabelMaps(); -- cgit v1.2.3-70-g09d2