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.
This commit is contained in:
Alexander Kromm (m8f) 2020-08-25 22:54:57 +07:00 committed by GitHub
parent d2a9de0012
commit 83ffcbf692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1811,8 +1811,11 @@ void G_DoPlayerPop(int playernum)
void G_ScreenShot (const char *filename) void G_ScreenShot (const char *filename)
{ {
if (gameaction == ga_nothing)
{
shotfile = filename; shotfile = filename;
gameaction = ga_screenshot; gameaction = ga_screenshot;
}
} }
@ -3072,7 +3075,10 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, MakeScreenShot)
void G_MakeAutoSave() void G_MakeAutoSave()
{ {
if (gameaction == ga_nothing)
{
gameaction = ga_autosave; gameaction = ga_autosave;
}
} }
DEFINE_ACTION_FUNCTION(FLevelLocals, MakeAutoSave) DEFINE_ACTION_FUNCTION(FLevelLocals, MakeAutoSave)