1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Fix #14677: desync due to using newgame time settings to validate savegame time settings

This commit is contained in:
Rubidium
2025-12-13 10:37:12 +01:00
committed by rubidium42
parent b03347f00c
commit 13ea783bd8

View File

@@ -670,7 +670,7 @@ static void ChangeMinutesPerYear(int32_t new_value)
static std::tuple<int32_t, uint32_t> GetMinutesPerYearRange(const IntSettingDesc &)
{
/* Allow a non-default value only if using Wallclock timekeeping units. */
if (_settings_newgame.economy.timekeeping_units == TKU_WALLCLOCK) return { CalendarTime::FROZEN_MINUTES_PER_YEAR, CalendarTime::MAX_MINUTES_PER_YEAR };
if (TimerGameEconomy::UsingWallclockUnits(_game_mode == GM_MENU)) return { CalendarTime::FROZEN_MINUTES_PER_YEAR, CalendarTime::MAX_MINUTES_PER_YEAR };
return { CalendarTime::DEF_MINUTES_PER_YEAR, CalendarTime::DEF_MINUTES_PER_YEAR };
}