Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Nov 8, 2023
1 parent 4003df9 commit ccf7600
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/crispy.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ typedef struct
boolean havessg;
boolean singleplayer;
boolean stretchsky;
boolean demogotonextlvl;

// [crispy] custom difficulty parameters
boolean autohealth;
Expand Down
2 changes: 2 additions & 0 deletions src/doom/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -3378,6 +3378,8 @@ boolean G_CheckDemoStatus (void)
// [crispy] fast forward to next level while demo playback
//

boolean demo_gotonextlvl;

void G_DemoGotoNextLevel (boolean start)
{
// disable screen rendering while fast forwarding
Expand Down
1 change: 1 addition & 0 deletions src/doom/g_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ boolean G_CheckDemoStatus (void);

// [crispy] fast forward to next level while demo playback
extern boolean netdemo;
extern boolean demo_gotonextlvl;
void G_DoPlayDemo (void);
void G_DemoGotoNextLevel (boolean start);

Expand Down
2 changes: 1 addition & 1 deletion src/doom/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ boolean M_Responder (event_t* ev)
if (demoplayback)
{
// [crispy] go to next level
crispy->demogotonextlvl = true;
demo_gotonextlvl = true;
G_DemoGotoNextLevel(true);
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions src/doom/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "s_musinfo.h" // [crispy] S_ParseMusInfo()
#include "i_swap.h" // [crispy] SHORT()
#include "w_wad.h" // [crispy] W_CacheLumpNum()
#include "g_game.h" // [crispy] G_DemoGotoNextLevel()
#include "g_game.h" // [crispy] demo_gotonextlvl

#include "doomstat.h"

Expand Down Expand Up @@ -891,9 +891,9 @@ void P_SpawnPlayer (mapthing_t* mthing)
int i;

// [crispy] stop fast forward after entering new level while demo playback
if (crispy->demogotonextlvl)
if (demo_gotonextlvl)
{
crispy->demogotonextlvl = false;
demo_gotonextlvl = false;
G_DemoGotoNextLevel(false);
}

Expand Down
5 changes: 3 additions & 2 deletions src/doom/s_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "p_local.h"
#include "w_wad.h"
#include "z_zone.h"
#include "g_game.h" // [crispy] demo_gotonextlvl

// when to clip out sounds
// Does not fit the large outdoor areas.
Expand Down Expand Up @@ -440,7 +441,7 @@ void S_Start(void)
{
const short curmap = (gameepisode << 8) + gamemap;

if (prevmap == curmap || (nodrawers && singletics && !crispy->demogotonextlvl))
if (prevmap == curmap || (nodrawers && singletics && !demo_gotonextlvl))
return;

prevmap = curmap;
Expand Down Expand Up @@ -933,7 +934,7 @@ void S_ChangeMusic(int musicnum, int looping)
musinfo.current_item = -1;

// [crispy] play no music if this is not the right map
if (nodrawers && singletics && !crispy->demogotonextlvl)
if (nodrawers && singletics && !demo_gotonextlvl)
return;

// [crispy] restart current music if IDMUS00 is entered
Expand Down

0 comments on commit ccf7600

Please sign in to comment.