From 38e37845495dd9d5e31f5d2b70596d0b01cec936 Mon Sep 17 00:00:00 2001 From: pogokeen Date: Tue, 8 May 2018 17:32:19 +0000 Subject: [PATCH] Incrementing ud.executions is now done in app_main() instead of CONFIG_WriteSetup() so that it is only incremented once per execution. git-svn-id: https://svn.eduke32.com/eduke32@6884 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/config.cpp | 2 +- source/duke3d/src/game.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index 705fa8305..9ed884c68 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -738,7 +738,7 @@ void CONFIG_WriteSetup(uint32_t flags) if (ud.config.scripthandle < 0) ud.config.scripthandle = SCRIPT_Init(g_setupFileName); - SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Executions",++ud.executions,FALSE,FALSE); + SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Executions",ud.executions,FALSE,FALSE); SCRIPT_PutNumber(ud.config.scripthandle, "Setup","ConfigVersion",BYTEVERSION_EDUKE32,FALSE,FALSE); SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "ForceSetup",ud.config.ForceSetup,FALSE,FALSE); diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index a93bf5b49..d6536bfc2 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -6482,6 +6482,7 @@ int app_main(int argc, char const * const * argv) g_mostConcurrentPlayers = ud.multimode; // XXX: redundant? + ++ud.executions; CONFIG_WriteSetup(1); CONFIG_ReadSetup();