From 83ffcbf692386bb7cb0071a827e78fb06951b8a5 Mon Sep 17 00:00:00 2001 From: "Alexander Kromm (m8f)" Date: Tue, 25 Aug 2020 22:54:57 +0700 Subject: [PATCH] autosave and make screenshot only if there is no other game actions (#1126) In-game fix for this bug: https://forum.zdoom.org/viewtopic.php?f=43&t=59889&start=60#p1121698 because it may be also caused by other scripts or even manually. --- src/g_game.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 41f1f5e8b..1cca12822 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1811,8 +1811,11 @@ void G_DoPlayerPop(int playernum) void G_ScreenShot (const char *filename) { - shotfile = filename; - gameaction = ga_screenshot; + if (gameaction == ga_nothing) + { + shotfile = filename; + gameaction = ga_screenshot; + } } @@ -3072,7 +3075,10 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, MakeScreenShot) void G_MakeAutoSave() { - gameaction = ga_autosave; + if (gameaction == ga_nothing) + { + gameaction = ga_autosave; + } } DEFINE_ACTION_FUNCTION(FLevelLocals, MakeAutoSave)