From 15d59cbbd86f9dba3c20f0b390e2b1ecddebd006 Mon Sep 17 00:00:00 2001 From: alufolie91 Date: Wed, 30 Aug 2023 22:20:07 +0200 Subject: [PATCH 1/3] i dont want any special music no to grow and star music! --- src/d_netcmd.c | 3 +++ src/g_game.c | 4 ++++ src/g_game.h | 1 + src/p_user.c | 4 ++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index cb2123e45..35e6857b1 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -976,6 +976,9 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_saltyhop); CV_RegisterVar(&cv_saltyhopsfx); CV_RegisterVar(&cv_saltysquish); + + CV_RegisterVar(&cv_growmusic); + CV_RegisterVar(&cv_supermusic); //CV_RegisterVar(&cv_crosshair); //CV_RegisterVar(&cv_crosshair2); diff --git a/src/g_game.c b/src/g_game.c index 0cb897b52..01037f3c6 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -468,6 +468,10 @@ consvar_t cv_songcredits = {"songcredits", "On", CV_SAVE, CV_OnOff, NULL, 0, NUL // Show "FREE PLAY" when you're alone. :( consvar_t cv_showfreeplay = { "showfreeplay", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; +// We can disable special tunes! +consvar_t cv_growmusic = {"growmusic", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_supermusic = {"supermusic", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; + /*consvar_t cv_crosshair = {"crosshair", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_crosshair2 = {"crosshair2", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_crosshair3 = {"crosshair3", "Off", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; diff --git a/src/g_game.h b/src/g_game.h index 67618296f..ceb8e1f9f 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -113,6 +113,7 @@ extern INT16 rw_maximums[NUM_WEAPONS]; extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatbacktint, cv_chatspamprotection/*, cv_compactscoreboard*/; extern consvar_t cv_songcredits; extern consvar_t cv_showfreeplay; +extern consvar_t cv_growmusic, cv_supermusic; extern consvar_t cv_pauseifunfocused; //extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4; extern consvar_t cv_invertmouse/*, cv_alwaysfreelook, cv_chasefreelook, cv_mousemove*/; diff --git a/src/p_user.c b/src/p_user.c index 700671ef6..feed77bd7 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1278,13 +1278,13 @@ void P_RestoreMusic(player_t *player) } // Item - Grow - if (wantedmus == 2) + if (wantedmus == 2 && cv_growmusic.value) { S_ChangeMusicInternal("kgrow", true); S_SetRestoreMusicFadeInCvar(&cv_growmusicfade); } // Item - Invincibility - else if (wantedmus == 1) + else if (wantedmus == 1 && cv_supermusic.value) { S_ChangeMusicInternal("kinvnc", true); S_SetRestoreMusicFadeInCvar(&cv_invincmusicfade); -- 2.54.0 From 1ab243d93a0294cc7063f1c35f5bba89b6377a7c Mon Sep 17 00:00:00 2001 From: alufolie91 Date: Wed, 30 Aug 2023 22:26:38 +0200 Subject: [PATCH 2/3] add shit to menu --- src/m_menu.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 3c67d86ce..ec4f2ebd7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1414,12 +1414,17 @@ static menuitem_t OP_SoundAdvancedMenu[] = { {IT_HEADER, NULL, "Tracker Module Options", NULL, 10}, - {IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 42}, - {IT_STRING | IT_CVAR, NULL, "Amiga Resampler", &cv_amigafilter, 62}, + {IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 22}, + {IT_STRING | IT_CVAR, NULL, "Amiga Resampler", &cv_amigafilter, 42}, #if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR > 4 - {IT_STRING | IT_CVAR, NULL, "Amiga Type", &cv_amigatype, 82}, + {IT_STRING | IT_CVAR, NULL, "Amiga Type", &cv_amigatype, 62}, #endif - {IT_STRING | IT_CVAR, NULL, "Stereo Seperation", &cv_stereosep, 102}, + {IT_STRING | IT_CVAR, NULL, "Stereo Seperation", &cv_stereosep, 82}, + + {IT_HEADER, NULL, "Misc", NULL, 105}, + + {IT_STRING | IT_CVAR, NULL, "Grow Music", &cv_growmusic, 117}, + {IT_STRING | IT_CVAR, NULL, "Invulnerability Music", &cv_supermusic, 137}, }; #endif -- 2.54.0 From f47cb885cc909604d6f69f8a60bc94c9d5ef16db Mon Sep 17 00:00:00 2001 From: alufolie91 Date: Wed, 30 Aug 2023 22:27:52 +0200 Subject: [PATCH 3/3] eeeeheheheeheheh ifdefs --- src/m_menu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index ec4f2ebd7..980a4c694 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1404,14 +1404,13 @@ static menuitem_t OP_SoundOptionsMenu[] = {IT_STRING|IT_CVAR, NULL, "Play Music While Unfocused", &cv_playmusicifunfocused, 125}, {IT_STRING|IT_CVAR, NULL, "Play SFX While Unfocused", &cv_playsoundifunfocused, 135}, -#ifdef HAVE_OPENMPT {IT_STRING|IT_SUBMENU, NULL, "Advanced Settings...", &OP_SoundAdvancedDef, 155} -#endif }; -#ifdef HAVE_OPENMPT + static menuitem_t OP_SoundAdvancedMenu[] = { +#ifdef HAVE_OPENMPT {IT_HEADER, NULL, "Tracker Module Options", NULL, 10}, {IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 22}, @@ -1420,13 +1419,13 @@ static menuitem_t OP_SoundAdvancedMenu[] = {IT_STRING | IT_CVAR, NULL, "Amiga Type", &cv_amigatype, 62}, #endif {IT_STRING | IT_CVAR, NULL, "Stereo Seperation", &cv_stereosep, 82}, - +#endif {IT_HEADER, NULL, "Misc", NULL, 105}, {IT_STRING | IT_CVAR, NULL, "Grow Music", &cv_growmusic, 117}, {IT_STRING | IT_CVAR, NULL, "Invulnerability Music", &cv_supermusic, 137}, }; -#endif + static menuitem_t OP_DataOptionsMenu[] = { -- 2.54.0