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);