From 00a4f5ddfd85ab1c785e46c100947ad76a2376a3 Mon Sep 17 00:00:00 2001 From: tritonas00 Date: Wed, 27 Jan 2021 20:52:04 +0200 Subject: [PATCH] autosave on exit --- source/main/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/main/main.cpp b/source/main/main.cpp index e26e369749..cdf364c98a 100644 --- a/source/main/main.cpp +++ b/source/main/main.cpp @@ -290,6 +290,10 @@ int main(int argc, char *argv[]) // -- Application events -- case MSG_APP_SHUTDOWN_REQUESTED: + if (App::app_state->GetEnum() == AppState::SIMULATION) + { + App::GetGameContext()->SaveScene("autosave.sav"); + } App::GetConsole()->SaveConfig(); // RoR.cfg App::GetDiscordRpc()->Shutdown(); #ifdef USE_SOCKETW