make a function for the music level start stuff
This commit is contained in:
1 parent
a81ea3c2cc
commit
fae42eecbc
4 files changed
+23
-16
No files matched your search
+2
-8
@@ -5469,11 +5469,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||
K_UpdateInvincibilitySounds(player); // Also thanks, VAda!
|
||||
|
||||
// Plays the music after the starting countdown.
|
||||
if (P_IsLocalPlayer(player) && leveltime == (starttime + (TICRATE/2)))
|
||||
{
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
S_ShowMusicCredit();
|
||||
}
|
||||
if (P_IsLocalPlayer(player))
|
||||
M_Start();
|
||||
}
|
||||
|
||||
void K_KartPlayerAfterThink(player_t *player)
|
||||
@@ -6827,10 +6824,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||
if ((leveltime == starttime-(3*TICRATE)) || (leveltime == starttime-(2*TICRATE)) || (leveltime == starttime-TICRATE))
|
||||
S_StartSound(NULL, sfx_s3ka7);
|
||||
if (leveltime == starttime)
|
||||
{
|
||||
S_StartSound(NULL, sfx_s3kad);
|
||||
S_StopMusic(); // The GO! sound stops the level start ambience
|
||||
}
|
||||
}
|
||||
|
||||
// Start charging once you're given the opportunity.
|
||||
|
||||
+1
-4
@@ -703,10 +703,7 @@ void P_RestoreMusic(player_t *player)
|
||||
if (P_EndingMusic(player))
|
||||
return;
|
||||
|
||||
// Event - Level Start
|
||||
if (leveltime < (starttime + (TICRATE/2)))
|
||||
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
|
||||
else // see also where time overs are handled - search for "lives = 2" in this file
|
||||
if (leveltime > (starttime + (TICRATE/2)))
|
||||
{
|
||||
INT32 wantedmus = 0; // 0 is level music, 1 is invincibility, 2 is grow
|
||||
|
||||
|
||||
+19
-4
@@ -1966,13 +1966,28 @@ void S_Start(void)
|
||||
mapmusresume = 0;
|
||||
}
|
||||
|
||||
//if (cv_resetmusic.value) // Starting ambience should always be restarted
|
||||
S_StopMusic();
|
||||
S_StopMusic();
|
||||
|
||||
if (leveltime < (starttime + (TICRATE/2))) // SRB2Kart
|
||||
S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0);
|
||||
else
|
||||
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
|
||||
//S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0);
|
||||
}
|
||||
|
||||
void M_Start(void)
|
||||
{
|
||||
if (leveltime > (starttime + (TICRATE/2)))
|
||||
return;
|
||||
|
||||
// The GO! sound stops the level start ambience
|
||||
if (leveltime == starttime)
|
||||
S_StopMusic();
|
||||
|
||||
// Plays the music after the starting countdown.
|
||||
if (leveltime == (starttime + (TICRATE/2)))
|
||||
{
|
||||
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
|
||||
S_ShowMusicCredit();
|
||||
}
|
||||
}
|
||||
|
||||
void S_RestartMusic(void)
|
||||
|
||||
@@ -101,6 +101,7 @@ void S_InitSfxChannels(INT32 sfxVolume);
|
||||
void S_StopSounds(void);
|
||||
void S_ClearSfx(void);
|
||||
void S_Start(void);
|
||||
void M_Start(void);
|
||||
|
||||
// Stops music and restarts it from same position. Used for instant applying changes to amiga filters.
|
||||
void S_RestartMusic(void);
|
||||
|
||||
Reference in new issue
Block a user