From 51371dce80845ac2fbf334d129e771936a5539e9 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 16 Nov 2025 15:03:34 +0100 Subject: [PATCH] delet cv_birdmusic toggle stuff was from ages ago, we can just check for the feature toggles instead --- src/g_game.c | 2 +- src/k_kart.c | 4 ++-- src/m_menudefs.c | 22 +++------------------- src/p_inter.c | 2 +- src/p_user.c | 1 + src/s_sound.c | 6 ++---- src/s_sound.h | 1 - src/sdl/mixer_sound.c | 2 +- 8 files changed, 11 insertions(+), 29 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index a9b2579a8..bafd63f3c 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2288,7 +2288,7 @@ void G_PlayerReborn(INT32 player) } /* I'm putting this here because lol */ - fade = (cv_birdmusic.value && cv_fading.value && P_IsLocalPlayer(p)); + fade = (cv_fading.value && P_IsLocalPlayer(p)); if (fade) { diff --git a/src/k_kart.c b/src/k_kart.c index 1383e4f7c..c40529b5e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -6479,7 +6479,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) } player->kartstuff[k_invincibilitytimer] = itemtime+(2*TICRATE); // 10 seconds - if (P_IsLocalPlayer(player) && cv_supermusic.value == 1 && cv_birdmusic.value) + if (cv_supermusic.value == 1 && P_IsLocalPlayer(player)) S_ChangeMusicSpecial("kinvnc"); P_RestoreMusic(player); @@ -6683,7 +6683,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (cv_kartdebugshrink.value && !modeattacking && !player->bot) player->mo->destscale = (6*player->mo->destscale)/8; player->kartstuff[k_growshrinktimer] = itemtime+(4*TICRATE); // 12 seconds - if (P_IsLocalPlayer(player) && cv_growmusic.value == 1 && cv_birdmusic.value ) + if (cv_growmusic.value == 1 && P_IsLocalPlayer(player)) S_ChangeMusicSpecial("kgrow"); P_RestoreMusic(player); S_StartSound(player->mo, sfx_kc5a); diff --git a/src/m_menudefs.c b/src/m_menudefs.c index 1ec40e621..fc1d7679d 100644 --- a/src/m_menudefs.c +++ b/src/m_menudefs.c @@ -2026,11 +2026,10 @@ static menuitem_t OP_BirdMenu[] = //{IT_STRING | IT_CVAR, NULL, "Encore Choices", &cv_encorevotes, 90}, {IT_HEADER, NULL, "Music", NULL, 70}, - {IT_STRING | IT_CVAR, NULL, "Music Features", &cv_birdmusic, 80}, - {IT_STRING | IT_CVAR, NULL, "Resume Level Music", &cv_resume, 95}, - {IT_STRING | IT_CVAR, NULL, "Restart Special Music", &cv_resetspecialmusic, 105}, + {IT_STRING | IT_CVAR, NULL, "Resume Level Music", &cv_resume, 80}, + {IT_STRING | IT_CVAR, NULL, "Restart Special Music", &cv_resetspecialmusic, 95}, - {IT_STRING | IT_SUBMENU, NULL, "Advanced Music Options...", &OP_AdvancedBirdDef, 130}, + {IT_STRING | IT_SUBMENU, NULL, "Advanced Music Options...", &OP_AdvancedBirdDef, 120}, }; static const char* OP_BirdTooltips[] = @@ -2044,7 +2043,6 @@ static const char* OP_BirdTooltips[] = //"Only show one battle choice in map vote", //"Amount of encore choices in map vote.", NULL, - "Global toggle for all bird music features.", "Resume level music from last position after music change.", "Restart Special music if item is used again.", "Options for advanced music settings.", @@ -2058,7 +2056,6 @@ enum viewpointext, freeplaytext, headermusic, - birdmusic, lvlresum, spclresum, advmusic, @@ -2885,19 +2882,6 @@ void Bird_menu_Onchange(void) OP_AdvancedBirdMenu[fadegrow].status = status; OP_AdvancedBirdMenu[respawnfadeout].status = status; OP_AdvancedBirdMenu[respawnfadein].status = status; - - if (cv_birdmusic.value) - { - OP_BirdMenu[lvlresum].status = IT_STRING | IT_CVAR; - OP_BirdMenu[spclresum].status = IT_STRING | IT_CVAR; - OP_BirdMenu[advmusic].status = IT_STRING | IT_SUBMENU; - } - else - { - OP_BirdMenu[lvlresum].status = IT_GRAYEDOUT; - OP_BirdMenu[spclresum].status = IT_GRAYEDOUT; - OP_BirdMenu[advmusic].status = IT_GRAYEDOUT; - } } //menu code is nice diff --git a/src/p_inter.c b/src/p_inter.c index 8b222cae5..876ffa4b5 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1605,7 +1605,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source) target->player->playerstate = PST_DEAD; - if (cv_birdmusic.value && cv_fading.value && P_IsLocalPlayer(target->player)) + if (cv_fading.value && P_IsLocalPlayer(target->player)) { if (netgame || multiplayer) ms = cv_respawntime.value * 1000; diff --git a/src/p_user.c b/src/p_user.c index ef585e6df..d0967c5b6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -700,6 +700,7 @@ void P_RestoreMusic(player_t *player) if (P_EndingMusic(player)) return; + // Event - Level Start if (leveltime < MUSICSTARTTIME) S_StartMapMusic(); else // see also where time overs are handled - search for "lives = 2" in this file diff --git a/src/s_sound.c b/src/s_sound.c index 12971e30e..5a24e4b9a 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -114,7 +114,6 @@ consvar_t cv_respawnfademusicback = {"respawnfademusicback", "500", CV_SAVE, CV_ consvar_t cv_resetspecialmusic = {"resetspecialmusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_resume = {"resume", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_fading = {"fading", "Off", CV_SAVE|CV_CALL, CV_OnOff, Bird_menu_Onchange, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_birdmusic = {"birdmusicstuff", "No", CV_SAVE|CV_CALL, CV_YesNo, Bird_menu_Onchange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_keepmusic = {"keepmusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_skipintromusic = {"skipintromusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -310,7 +309,6 @@ void S_RegisterSoundStuff(void) CV_RegisterVar(&cv_resume); CV_RegisterVar(&cv_fading); - CV_RegisterVar(&cv_birdmusic); // bird music stuff end CV_RegisterVar(&cv_keepmusic); @@ -1854,7 +1852,7 @@ void S_StopMusic(void) || demo.title) // SRB2Kart: Demos don't interrupt title screen music return; - mapmusic.resume = (cv_birdmusic.value && fasticmp(music.name, mapmusic.name)) ? I_GetSongPosition() : 0; + mapmusic.resume = (cv_resume.value && fasticmp(music.name, mapmusic.name)) ? I_GetSongPosition() : 0; S_SetKeepMusResume(); @@ -1906,7 +1904,7 @@ void S_SetMusicVolume(INT32 volume) void S_SetRestoreMusicFadeInCvar(consvar_t *cv) { - music_refade_cv = cv_birdmusic.value ? cv : 0; + music_refade_cv = cv; } int S_GetRestoreMusicFadeIn(void) diff --git a/src/s_sound.h b/src/s_sound.h index 1fa895d03..9e0296d2b 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -68,7 +68,6 @@ extern consvar_t cv_resetspecialmusic; extern consvar_t cv_resume; extern consvar_t cv_fading; -extern consvar_t cv_birdmusic; extern consvar_t cv_keepmusic; extern consvar_t cv_skipintromusic; diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index aae5c4ca4..8330828f8 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -626,7 +626,7 @@ static void Countstutter(int len) { UINT32 bytes; - if (!cv_birdmusic.value || gamestate != GS_LEVEL) + if (gamestate != GS_LEVEL) return; if (hu_stopped)