mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Merge branch 'kstart-sfx' into 'master'
POSITION Music See merge request KartKrew/Kart!552
This commit is contained in:
commit
eb9a6f3445
7 changed files with 25 additions and 14 deletions
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -81,11 +81,9 @@ void K_TimerInit(void)
|
||||||
rainbowstartavailable = false;
|
rainbowstartavailable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numPlayers <= 2)
|
// No intro in Record Attack / 1v1
|
||||||
{
|
// Leave unset for the value in K_TimerReset
|
||||||
introtime = 0; // No intro in Record Attack / 1v1
|
if (numPlayers > 2)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
introtime = (108) + 5; // 108 for rotation, + 5 for white fade
|
introtime = (108) + 5; // 108 for rotation, + 5 for white fade
|
||||||
}
|
}
|
||||||
|
|
@ -9675,11 +9673,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
if ((leveltime == starttime-(3*TICRATE)) || (leveltime == starttime-(2*TICRATE)) || (leveltime == starttime-TICRATE))
|
if ((leveltime == starttime-(3*TICRATE)) || (leveltime == starttime-(2*TICRATE)) || (leveltime == starttime-TICRATE))
|
||||||
S_StartSound(NULL, sfx_s3ka7);
|
S_StartSound(NULL, sfx_s3ka7);
|
||||||
if (leveltime == starttime)
|
|
||||||
{
|
if (leveltime == starttime-(3*TICRATE))
|
||||||
|
S_FadeOutStopMusic(3500);
|
||||||
|
else if (leveltime == starttime)
|
||||||
S_StartSound(NULL, sfx_s3kad);
|
S_StartSound(NULL, sfx_s3kad);
|
||||||
S_StopMusic(); // The GO! sound stops the level start ambience
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
13
src/p_tick.c
13
src/p_tick.c
|
|
@ -617,6 +617,19 @@ void P_Ticker(boolean run)
|
||||||
S_ShowMusicCredit();
|
S_ShowMusicCredit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (encoremode)
|
||||||
|
{
|
||||||
|
// Encore humming starts immediately.
|
||||||
|
if (leveltime == 3)
|
||||||
|
S_ChangeMusicInternal("encore", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Plays the POSITION music after the camera spin
|
||||||
|
if (leveltime == introtime)
|
||||||
|
S_ChangeMusicInternal("postn", true);
|
||||||
|
}
|
||||||
|
|
||||||
ps_lua_thinkframe_time = I_GetPreciseTime();
|
ps_lua_thinkframe_time = I_GetPreciseTime();
|
||||||
LUAh_ThinkFrame();
|
LUAh_ThinkFrame();
|
||||||
ps_lua_thinkframe_time = I_GetPreciseTime() - ps_lua_thinkframe_time;
|
ps_lua_thinkframe_time = I_GetPreciseTime() - ps_lua_thinkframe_time;
|
||||||
|
|
|
||||||
|
|
@ -804,9 +804,7 @@ void P_RestoreMusic(player_t *player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Event - Level Start
|
// Event - Level Start
|
||||||
if (leveltime < (starttime + (TICRATE/2)))
|
if (leveltime >= (starttime + (TICRATE/2))) // see also where time overs are handled - search for "lives = 2" in this file
|
||||||
S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic();
|
|
||||||
else // see also where time overs are handled - search for "lives = 2" in this file
|
|
||||||
{
|
{
|
||||||
INT32 wantedmus = 0; // 0 is level music, 1 is invincibility, 2 is grow
|
INT32 wantedmus = 0; // 0 is level music, 1 is invincibility, 2 is grow
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2351,7 +2351,7 @@ void S_StartEx(boolean reset)
|
||||||
S_StopMusic(); // Starting ambience should always be restarted, if playing.
|
S_StopMusic(); // Starting ambience should always be restarted, if playing.
|
||||||
|
|
||||||
if (leveltime < (starttime + (TICRATE/2))) // SRB2Kart
|
if (leveltime < (starttime + (TICRATE/2))) // SRB2Kart
|
||||||
S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0);
|
S_StartSound(NULL, encoremode ? sfx_ruby2 : sfx_kstart);
|
||||||
else
|
else
|
||||||
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
|
S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1227,7 +1227,7 @@ boolean I_LoadSong(char *data, size_t len)
|
||||||
else if (!strncmp(p, key3, key3len)) // is it LOOPMS=?
|
else if (!strncmp(p, key3, key3len)) // is it LOOPMS=?
|
||||||
{
|
{
|
||||||
p += key3len; // skip MS=
|
p += key3len; // skip MS=
|
||||||
loop_point = (float)(atoi(p) / 1000.0L); // LOOPMS works by real time, as miliseconds.
|
loop_point = atof(p) / 1000.f; // LOOPMS works by real time, as miliseconds.
|
||||||
// Everything that uses LOOPMS will work perfectly with SDL_Mixer.
|
// Everything that uses LOOPMS will work perfectly with SDL_Mixer.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1099,6 +1099,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Debug notification
|
{"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Debug notification
|
||||||
{"cock", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Hammer cocks, bang bang
|
{"cock", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Hammer cocks, bang bang
|
||||||
{"itcaps", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, "Item capsule"},
|
{"itcaps", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, "Item capsule"},
|
||||||
|
{"kstart", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Sonic Adventure shwing!
|
||||||
|
|
||||||
// SRB2Kart - Engine sounds
|
// SRB2Kart - Engine sounds
|
||||||
// Engine class A
|
// Engine class A
|
||||||
|
|
|
||||||
|
|
@ -1163,6 +1163,7 @@ typedef enum
|
||||||
sfx_dbgsal,
|
sfx_dbgsal,
|
||||||
sfx_cock,
|
sfx_cock,
|
||||||
sfx_itcaps,
|
sfx_itcaps,
|
||||||
|
sfx_kstart,
|
||||||
|
|
||||||
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
|
// Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy...
|
||||||
// Engine class A - Low Speed, Low Weight
|
// Engine class A - Low Speed, Low Weight
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue