mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-06 08:22:01 +00:00
1upsound always plays a sound instead of jingle
This commit is contained in:
parent
5c60f8b529
commit
1113a13621
3 changed files with 18 additions and 0 deletions
|
@ -1463,6 +1463,13 @@ void P_PlayLivesJingle(player_t *player)
|
||||||
S_StartSound(NULL, sfx_oneup);
|
S_StartSound(NULL, sfx_oneup);
|
||||||
else if (mariomode)
|
else if (mariomode)
|
||||||
S_StartSound(NULL, sfx_marioa);
|
S_StartSound(NULL, sfx_marioa);
|
||||||
|
else if (cv_1upsound.value)
|
||||||
|
{
|
||||||
|
if (S_sfx[sfx_oneup].lumpnum != LUMPERROR)
|
||||||
|
S_StartSound(NULL, sfx_oneup);
|
||||||
|
else
|
||||||
|
S_StartSound(NULL, sfx_chchng);/* at least play something! */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
P_PlayJingle(player, JT_1UP);
|
P_PlayJingle(player, JT_1UP);
|
||||||
|
|
|
@ -117,6 +117,14 @@ static consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL
|
||||||
consvar_t cv_resetmusic = {"resetmusic", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_resetmusic = {"resetmusic", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_resetmusicbyheader = {"resetmusicbyheader", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_resetmusicbyheader = {"resetmusicbyheader", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
static CV_PossibleValue_t cons_1upsound_t[] = {
|
||||||
|
{0, "Jingle"},
|
||||||
|
{1, "Sound"},
|
||||||
|
|
||||||
|
{0}
|
||||||
|
};
|
||||||
|
consvar_t cv_1upsound = {"1upsound", "Jingle", CV_SAVE, cons_1upsound_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// Sound system toggles, saved into the config
|
// Sound system toggles, saved into the config
|
||||||
consvar_t cv_gamedigimusic = {"digimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameDigiMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_gamedigimusic = {"digimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameDigiMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_gamemidimusic = {"midimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameMIDIMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_gamemidimusic = {"midimusic", "On", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, GameMIDIMusic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -287,6 +295,7 @@ void S_RegisterSoundStuff(void)
|
||||||
CV_RegisterVar(&cv_samplerate);
|
CV_RegisterVar(&cv_samplerate);
|
||||||
CV_RegisterVar(&cv_resetmusic);
|
CV_RegisterVar(&cv_resetmusic);
|
||||||
CV_RegisterVar(&cv_resetmusicbyheader);
|
CV_RegisterVar(&cv_resetmusicbyheader);
|
||||||
|
CV_RegisterVar(&cv_1upsound);
|
||||||
CV_RegisterVar(&cv_playsoundsifunfocused);
|
CV_RegisterVar(&cv_playsoundsifunfocused);
|
||||||
CV_RegisterVar(&cv_playmusicifunfocused);
|
CV_RegisterVar(&cv_playmusicifunfocused);
|
||||||
CV_RegisterVar(&cv_gamesounds);
|
CV_RegisterVar(&cv_gamesounds);
|
||||||
|
|
|
@ -35,6 +35,8 @@ extern consvar_t cv_numChannels;
|
||||||
extern consvar_t cv_resetmusic;
|
extern consvar_t cv_resetmusic;
|
||||||
extern consvar_t cv_resetmusicbyheader;
|
extern consvar_t cv_resetmusicbyheader;
|
||||||
|
|
||||||
|
extern consvar_t cv_1upsound;
|
||||||
|
|
||||||
#define RESETMUSIC (!modeattacking && \
|
#define RESETMUSIC (!modeattacking && \
|
||||||
(cv_resetmusicbyheader.value ? \
|
(cv_resetmusicbyheader.value ? \
|
||||||
(mapheaderinfo[gamemap-1]->musforcereset != -1 ? mapheaderinfo[gamemap-1]->musforcereset : cv_resetmusic.value) \
|
(mapheaderinfo[gamemap-1]->musforcereset != -1 ? mapheaderinfo[gamemap-1]->musforcereset : cv_resetmusic.value) \
|
||||||
|
|
Loading…
Reference in a new issue