No longer save/load water region invalidation states
Move InitializeWaterRegions to AllocateMap No longer ForceUpdate in InitializeWaterRegions
This commit is contained in:
@@ -4399,8 +4399,6 @@ bool AfterLoadGame()
|
||||
c->settings = _settings_client.company;
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_WATER_REGIONS) && SlXvIsFeatureMissing(XSLFI_WATER_REGIONS)) InitializeWaterRegions();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -26,12 +26,6 @@ struct WRGNChunkHandler : ChunkHandler {
|
||||
void Save() const override
|
||||
{
|
||||
SlTableHeader(_water_region_desc);
|
||||
|
||||
int index = 0;
|
||||
for (WaterRegionSaveLoadInfo ®ion : GetWaterRegionSaveLoadInfo()) {
|
||||
SlSetArrayIndex(index++);
|
||||
SlObject(®ion, _water_region_desc);
|
||||
}
|
||||
}
|
||||
|
||||
void Load() const override
|
||||
@@ -40,14 +34,10 @@ struct WRGNChunkHandler : ChunkHandler {
|
||||
|
||||
int index;
|
||||
|
||||
std::vector<WaterRegionSaveLoadInfo> loaded_info;
|
||||
while ((index = SlIterateArray()) != -1) {
|
||||
WaterRegionSaveLoadInfo region_info;
|
||||
SlObject(®ion_info, slt);
|
||||
loaded_info.push_back(std::move(region_info));
|
||||
}
|
||||
|
||||
LoadWaterRegions(loaded_info);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user