Add setting for milliseconds per game tick mode
This commit is contained in:
@@ -568,6 +568,8 @@ void MakeNewgameSettingsLive()
|
||||
if (_settings_newgame.game_config != nullptr) {
|
||||
_settings_game.game_config = new GameConfig(_settings_newgame.game_config);
|
||||
}
|
||||
|
||||
SetupTickRate();
|
||||
}
|
||||
|
||||
void OpenBrowser(const char *url)
|
||||
@@ -2027,7 +2029,7 @@ void StateGameLoop()
|
||||
_scaled_date_ticks++; // This must update in lock-step with _tick_skip_counter, such that it always matches what SetScaledTickVariables would return.
|
||||
|
||||
if (_settings_client.gui.autosave == 6 && !(_game_mode == GM_MENU || _game_mode == GM_BOOTSTRAP) &&
|
||||
(_scaled_date_ticks % (_settings_client.gui.autosave_custom_minutes * (60000 / MILLISECONDS_PER_TICK))) == 0) {
|
||||
(_scaled_date_ticks % (_settings_client.gui.autosave_custom_minutes * (_settings_game.economy.tick_rate == TRM_MODERN ? (60000 / 27) : (60000 / 30)))) == 0) {
|
||||
_do_autosave = true;
|
||||
_check_special_modes = true;
|
||||
SetWindowDirty(WC_STATUS_BAR, 0);
|
||||
|
Reference in New Issue
Block a user