From ccf760044beca31ec5ebece320beb95bb8967934 Mon Sep 17 00:00:00 2001 From: Julia Nechaevskaya Date: Wed, 8 Nov 2023 09:24:21 +0300 Subject: [PATCH] Revert unnecessary changes --- src/crispy.h | 1 - src/doom/g_game.c | 2 ++ src/doom/g_game.h | 1 + src/doom/m_menu.c | 2 +- src/doom/p_mobj.c | 6 +++--- src/doom/s_sound.c | 5 +++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/crispy.h b/src/crispy.h index 40aabcc320..773bd30f02 100644 --- a/src/crispy.h +++ b/src/crispy.h @@ -101,7 +101,6 @@ typedef struct boolean havessg; boolean singleplayer; boolean stretchsky; - boolean demogotonextlvl; // [crispy] custom difficulty parameters boolean autohealth; diff --git a/src/doom/g_game.c b/src/doom/g_game.c index 608d8b3287..82d71dce89 100644 --- a/src/doom/g_game.c +++ b/src/doom/g_game.c @@ -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 diff --git a/src/doom/g_game.h b/src/doom/g_game.h index c3cedf7934..c819fed5ff 100644 --- a/src/doom/g_game.h +++ b/src/doom/g_game.h @@ -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); diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c index 0d97aab0a2..b19a91d11e 100644 --- a/src/doom/m_menu.c +++ b/src/doom/m_menu.c @@ -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; } diff --git a/src/doom/p_mobj.c b/src/doom/p_mobj.c index c42eb70e1e..bf3aaf1d51 100644 --- a/src/doom/p_mobj.c +++ b/src/doom/p_mobj.c @@ -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" @@ -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); } diff --git a/src/doom/s_sound.c b/src/doom/s_sound.c index 0f7fc4010c..23cfda75b1 100644 --- a/src/doom/s_sound.c +++ b/src/doom/s_sound.c @@ -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. @@ -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; @@ -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