Always use 27ms/tick in wallclock timing mode

This commit is contained in:
Jonathan G Rennison
2024-02-16 17:54:53 +00:00
parent 450c6b76d6
commit c45bfccc2e
3 changed files with 3 additions and 1 deletions

View File

@@ -2260,6 +2260,6 @@ void ChangeGameSpeed(bool enable_fast_forward)
void SetupTickRate() void SetupTickRate()
{ {
_milliseconds_per_tick = (_settings_game.economy.tick_rate == TRM_MODERN) ? 27 : 30; _milliseconds_per_tick = (_settings_game.economy.tick_rate == TRM_MODERN || _settings_game.economy.timekeeping_units == TKU_WALLCLOCK) ? 27 : 30;
_ticks_per_second = 1000.0f / _milliseconds_per_tick; _ticks_per_second = 1000.0f / _milliseconds_per_tick;
} }

View File

@@ -670,6 +670,7 @@ bool AfterLoadGame()
TileIndex map_size = MapSize(); TileIndex map_size = MapSize();
UpdateEffectiveDayLengthFactor(); UpdateEffectiveDayLengthFactor();
SetupTickRate();
extern TileIndex _cur_tileloop_tile; // From landscape.cpp. extern TileIndex _cur_tileloop_tile; // From landscape.cpp.
/* The LFSR used in RunTileLoop iteration cannot have a zeroed state, make it non-zeroed. */ /* The LFSR used in RunTileLoop iteration cannot have a zeroed state, make it non-zeroed. */

View File

@@ -1275,6 +1275,7 @@ static void ChangeTimekeepingUnits(int32_t)
} }
UpdateEffectiveDayLengthFactor(); UpdateEffectiveDayLengthFactor();
SetupTickRate();
} }
/** /**