mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Saveload: Rename IsSavegameVersionUntil to IsSavegameVersionBeforeOrAt
To match upstream
This commit is contained in:
parent
ea0fa2194a
commit
593a81d421
@ -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)) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user