Merge branch 'master' into jgrpp
# Conflicts:
# src/lang/korean.txt
# src/saveload/afterload.cpp
Recalculate docking tile cache due to 57553cd8
This commit is contained in:
@@ -3664,12 +3664,8 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_MULTITILE_DOCKS) || !SlXvIsFeaturePresent(XSLFI_MULTIPLE_DOCKS, 2)) {
|
||||
/* Scan for docking tiles */
|
||||
for (Station *st : Station::Iterate()) {
|
||||
if (st->ship_station.tile != INVALID_TILE) UpdateStationDockingTiles(st);
|
||||
}
|
||||
}
|
||||
/* Update station docking tiles. */
|
||||
AfterLoadScanDockingTiles();
|
||||
|
||||
/* Compute station catchment areas. This is needed here in case UpdateStationAcceptance is called below. */
|
||||
Station::RecomputeCatchmentForAll();
|
||||
|
@@ -113,6 +113,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_FLOW_STAT_FLAGS, XSCF_NULL, 1, 1, "flow_stat_flags", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_SPEED_RESTRICTION, XSCF_NULL, 1, 1, "speed_restriction", nullptr, nullptr, "VESR" },
|
||||
{ XSLFI_STATION_GOODS_EXTRA, XSCF_NULL, 1, 1, "station_goods_extra", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_DOCKING_CACHE_VER, XSCF_IGNORABLE_ALL, 1, 1, "docking_cache_ver", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, nullptr, nullptr, nullptr, nullptr },// This is the end marker
|
||||
};
|
||||
|
||||
|
@@ -78,6 +78,7 @@ enum SlXvFeatureIndex {
|
||||
XSLFI_FLOW_STAT_FLAGS, ///< FlowStat flags
|
||||
XSLFI_SPEED_RESTRICTION, ///< Train speed restrictions
|
||||
XSLFI_STATION_GOODS_EXTRA, ///< Extra station goods entry statuses
|
||||
XSLFI_DOCKING_CACHE_VER, ///< Multiple docks - docking tile cache version
|
||||
|
||||
XSLFI_RIFF_HEADER_60_BIT, ///< Size field in RIFF chunk header is 60 bit
|
||||
XSLFI_HEIGHT_8_BIT, ///< Map tile height is 8 bit instead of 4 bit, but savegame version may be before this became true in trunk
|
||||
|
@@ -30,6 +30,7 @@ void FixupTrainLengths();
|
||||
void AfterLoadTemplateVehicles();
|
||||
void AfterLoadStations();
|
||||
void AfterLoadRoadStops();
|
||||
void AfterLoadScanDockingTiles();
|
||||
void ResetLabelMaps();
|
||||
void AfterLoadLabelMaps();
|
||||
void AfterLoadStoryBook();
|
||||
|
@@ -144,6 +144,19 @@ void AfterLoadRoadStops()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* (Re)scan for station docking tiles after loading a savegame.
|
||||
*/
|
||||
void AfterLoadScanDockingTiles()
|
||||
{
|
||||
if (IsSavegameVersionBefore(SLV_MULTITILE_DOCKS) || !SlXvIsFeaturePresent(XSLFI_MULTIPLE_DOCKS, 2) || !SlXvIsFeaturePresent(XSLFI_DOCKING_CACHE_VER, 1)) {
|
||||
/* Scan for docking tiles */
|
||||
for (Station *st : Station::Iterate()) {
|
||||
if (st->ship_station.tile != INVALID_TILE) UpdateStationDockingTiles(st);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const SaveLoad _roadstop_desc[] = {
|
||||
SLE_VAR(RoadStop, xy, SLE_UINT32),
|
||||
SLE_CONDNULL(1, SL_MIN_VERSION, SLV_45),
|
||||
|
Reference in New Issue
Block a user