Skip to content

Commit

Permalink
allow not to quit on demo end
Browse files Browse the repository at this point in the history
  • Loading branch information
feos committed Jun 21, 2022
1 parent 5b5d406 commit 9893e9e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions prboom2/src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -4288,14 +4288,15 @@ dboolean G_CheckDemoStatus (void)

M_SaveDefaults();

I_Error ("Timed %u gametics in %u realtics = %-.1f frames per second",
(unsigned) gametic,realtics,
(unsigned) gametic * (double) TICRATE / realtics);
if (demo_endquit)
I_Error ("Timed %u gametics in %u realtics = %-.1f frames per second",
(unsigned) gametic,realtics,
(unsigned) gametic * (double) TICRATE / realtics);
}

if (demoplayback)
{
if (singledemo)
if (singledemo && demo_endquit)
I_SafeExit(0); // killough

if (demolumpnum != -1) {
Expand Down
2 changes: 2 additions & 0 deletions prboom2/src/m_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ default_t defaults[] =
def_bool,ss_stat},
{"demo_smoothturnsfactor", {&demo_smoothturnsfactor}, {6},1,SMOOTH_PLAYING_MAXFACTOR,
def_int,ss_stat},
{"demo_endquit", {&demo_endquit}, {1},0,1,
def_bool,ss_stat},
{"boom_autoswitch", {(int*)&boom_autoswitch}, {1}, 0, 1, def_bool, ss_none},

{"Files",{NULL},{0},UL,UL,def_none,ss_none},
Expand Down
2 changes: 2 additions & 0 deletions prboom2/src/r_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ const char *demo_patterns_mask;
char **demo_patterns_list;
const char *demo_patterns_list_def[9];

int demo_endquit;

// demo ex
int demo_extendedformat = -1;
int demo_extendedformat_default;
Expand Down
2 changes: 2 additions & 0 deletions prboom2/src/r_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ typedef struct
char *missed;
} patterndata_t;

extern int demo_endquit;

extern int demo_extendedformat;
extern int demo_extendedformat_default;
extern const char *demo_demoex_filename;
Expand Down

0 comments on commit 9893e9e

Please sign in to comment.