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
This commit is contained in:
pogokeen 2018-05-08 17:32:19 +00:00
parent dcdffb73d0
commit 38e3784549
2 changed files with 2 additions and 1 deletions

View file

@ -738,7 +738,7 @@ void CONFIG_WriteSetup(uint32_t flags)
if (ud.config.scripthandle < 0) if (ud.config.scripthandle < 0)
ud.config.scripthandle = SCRIPT_Init(g_setupFileName); 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","ConfigVersion",BYTEVERSION_EDUKE32,FALSE,FALSE);
SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "ForceSetup",ud.config.ForceSetup,FALSE,FALSE); SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "ForceSetup",ud.config.ForceSetup,FALSE,FALSE);

View file

@ -6482,6 +6482,7 @@ int app_main(int argc, char const * const * argv)
g_mostConcurrentPlayers = ud.multimode; // XXX: redundant? g_mostConcurrentPlayers = ud.multimode; // XXX: redundant?
++ud.executions;
CONFIG_WriteSetup(1); CONFIG_WriteSetup(1);
CONFIG_ReadSetup(); CONFIG_ReadSetup();