mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-22 19:02:15 +00:00
Redone credits for joiners in a less stupid way, + redone start ambience in a less stupid way
This commit is contained in:
parent
9975497a68
commit
37e79ebfbd
5 changed files with 14 additions and 10 deletions
|
@ -2362,6 +2362,7 @@ void G_PlayerReborn(INT32 player)
|
|||
INT32 bumper;
|
||||
INT32 comebackpoints;
|
||||
INT32 wanted;
|
||||
boolean songcredit = false;
|
||||
|
||||
score = players[player].score;
|
||||
marescore = players[player].marescore;
|
||||
|
@ -2540,10 +2541,13 @@ void G_PlayerReborn(INT32 player)
|
|||
strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7);
|
||||
mapmusname[6] = 0;
|
||||
mapmusflags = mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK;
|
||||
songcredit = true;
|
||||
}
|
||||
}
|
||||
|
||||
P_RestoreMusic(p);
|
||||
if (songcredit)
|
||||
S_ShowMusicCredit();
|
||||
|
||||
if (leveltime > (starttime + (TICRATE/2)) && !p->spectator)
|
||||
p->kartstuff[k_respawn] = 48; // Respawn effect
|
||||
|
|
|
@ -4445,7 +4445,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
// Plays the music after the starting countdown.
|
||||
if (P_IsLocalPlayer(player) && leveltime == (starttime + (TICRATE/2)))
|
||||
{
|
||||
S_ChangeMusicInternal(mapmusname, true);
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
S_ShowMusicCredit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2869,10 +2869,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
// As oddly named as this is, this handles music only.
|
||||
// We should be fine starting it here.
|
||||
S_Start();
|
||||
// SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished
|
||||
// but we do still need the mapmusname to be changed
|
||||
if (leveltime < (starttime + (TICRATE/2)))
|
||||
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
|
||||
|
||||
levelfadecol = (encoremode && !ranspecialwipe ? 122 : 120);
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ consvar_t cv_numChannels = {"snd_channels", "64", CV_SAVE|CV_CALL, CV_Unsigned,
|
|||
#endif
|
||||
|
||||
consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_resetmusic = {"resetmusic", "No", CV_SAVE|CV_NOSHOWHELP, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
//consvar_t cv_resetmusic = {"resetmusic", "No", CV_SAVE|CV_NOSHOWHELP, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// 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};
|
||||
|
@ -263,7 +263,7 @@ void S_RegisterSoundStuff(void)
|
|||
#endif
|
||||
CV_RegisterVar(&surround);
|
||||
CV_RegisterVar(&cv_samplerate);
|
||||
CV_RegisterVar(&cv_resetmusic);
|
||||
//CV_RegisterVar(&cv_resetmusic);
|
||||
CV_RegisterVar(&cv_gamesounds);
|
||||
CV_RegisterVar(&cv_gamedigimusic);
|
||||
#ifndef NO_MIDI
|
||||
|
@ -2043,9 +2043,13 @@ void S_Start(void)
|
|||
mapmusflags = (mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK);
|
||||
}
|
||||
|
||||
if (cv_resetmusic.value)
|
||||
//if (cv_resetmusic.value) // Starting ambience should always be restarted
|
||||
S_StopMusic();
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
|
||||
if (leveltime < (starttime + (TICRATE/2))) // SRB2Kart
|
||||
S_ChangeMusic((encoremode ? "estart" : "kstart"), 0, false);
|
||||
else
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
}
|
||||
|
||||
static void Command_Tunes_f(void)
|
||||
|
|
|
@ -27,7 +27,7 @@ extern consvar_t stereoreverse;
|
|||
extern consvar_t cv_soundvolume, cv_digmusicvolume;//, cv_midimusicvolume;
|
||||
extern consvar_t cv_numChannels;
|
||||
extern consvar_t surround;
|
||||
extern consvar_t cv_resetmusic;
|
||||
//extern consvar_t cv_resetmusic;
|
||||
extern consvar_t cv_gamedigimusic;
|
||||
#ifndef NO_MIDI
|
||||
extern consvar_t cv_gamemidimusic;
|
||||
|
|
Loading…
Reference in a new issue