Saveload: Rename IsSavegameVersionUntil to IsSavegameVersionBeforeOrAt

To match upstream
This commit is contained in:
Jonathan G Rennison 2024-02-21 23:26:11 +00:00
parent ea0fa2194a
commit 593a81d421
2 changed files with 3 additions and 3 deletions

View File

@ -3934,7 +3934,7 @@ bool AfterLoadGame()
}
}
if (IsSavegameVersionUntil(SLV_ENDING_YEAR) || !SlXvIsFeaturePresent(XSLFI_MULTIPLE_DOCKS, 2) || !SlXvIsFeaturePresent(XSLFI_DOCKING_CACHE_VER, 3)) {
if (IsSavegameVersionBeforeOrAt(SLV_ENDING_YEAR) || !SlXvIsFeaturePresent(XSLFI_MULTIPLE_DOCKS, 2) || !SlXvIsFeaturePresent(XSLFI_DOCKING_CACHE_VER, 3)) {
/* Update station docking tiles. Was only needed for pre-SLV_MULTITLE_DOCKS
* savegames, but a bug in docking tiles touched all savegames between
* SLV_MULTITILE_DOCKS and SLV_ENDING_YEAR. */
@ -4374,7 +4374,7 @@ bool AfterLoadGame()
}
if (SlXvIsFeatureMissing(XSLFI_VARIABLE_TICK_RATE)) {
_settings_game.economy.tick_rate = IsSavegameVersionUntil(SLV_MORE_CARGO_AGE) ? TRM_TRADITIONAL : TRM_MODERN;
_settings_game.economy.tick_rate = IsSavegameVersionBeforeOrAt(SLV_MORE_CARGO_AGE) ? TRM_TRADITIONAL : TRM_MODERN;
}
if (SlXvIsFeatureMissing(XSLFI_ROAD_VEH_FLAGS)) {

View File

@ -919,7 +919,7 @@ inline bool IsSavegameVersionBefore(SaveLoadVersion major, byte minor = 0)
* @param major Major number of the version to check against.
* @return Savegame version is at most the specified version.
*/
inline bool IsSavegameVersionUntil(SaveLoadVersion major)
inline bool IsSavegameVersionBeforeOrAt(SaveLoadVersion major)
{
extern SaveLoadVersion _sl_version;
return _sl_version <= major;