Repair demos that finish without crashing inexplicably returning to titlescreen after their completion

It's because of cv_cheats' default value in DEVELOP builds...
This commit is contained in:
toaster 2023-01-28 23:18:50 +00:00 committed by NepDisk
parent 6417a7f1f2
commit a16e800e6e
2 changed files with 10 additions and 2 deletions

View file

@ -1995,7 +1995,15 @@ void CV_RevertNetVars(void)
{
if (cvar->revert.v.string != NULL)
{
Setvalue(cvar, cvar->revert.v.string, false);
Setvalue(
cvar,
cvar->revert.v.string,
#ifdef DEVELOP
(cvar == &cv_cheats)
#else
false
#endif
);
if (cvar->revert.allocated)
{

View file

@ -4302,7 +4302,7 @@ void G_StopDemo(void)
P_SaveBufferFree(&demobuf);
demo.playback = false;
if (demo.title)
modeattacking = false;
modeattacking = ATTACKING_NONE;
demo.title = false;
demo.timing = false;
singletics = false;