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
parent 7ea596daae
commit 05301d0825
2 changed files with 10 additions and 2 deletions

View file

@ -1859,7 +1859,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

@ -4010,7 +4010,7 @@ void G_StopDemo(void)
demobuf.buffer = NULL;
demo.playback = false;
if (demo.title)
modeattacking = false;
modeattacking = ATTACKING_NONE;
demo.title = false;
demo.timing = false;
singletics = false;