Skip autosave while in demo playback modes

Reported-by: polstomo <https://github.com/dxx-rebirth/dxx-rebirth/issues/598>
This commit is contained in:
Kp 2021-07-25 23:00:56 +00:00
parent 56c98f5345
commit e0820e2825

View file

@ -1018,6 +1018,8 @@ void state_poll_autosave_game(d_game_unique_state &GameUniqueState, const d_leve
auto &Objects = LevelUniqueObjectState.Objects;
if (deny_save_game(Objects.vcptr, LevelUniqueControlCenterState, GameUniqueState) != deny_save_result::allowed)
return;
if (Newdemo_state != ND_STATE_NORMAL && Newdemo_state != ND_STATE_RECORDING)
return;
const auto now = std::chrono::steady_clock::now();
if (now < GameUniqueState.Next_autosave)
return;