(svn r23942) -Fix: infrastructure cache of standard road stops would get messed up when buying a company with them

This commit is contained in:
rubidium
2012-02-13 17:18:20 +00:00
parent b5525fd33d
commit 060cac439c
2 changed files with 12 additions and 6 deletions

View File

@@ -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();