Fix sounds playing multiple times during intro if interpolation is on

This commit is contained in:
SteelT 2022-01-12 20:57:25 -05:00 committed by SinnamonLat
parent 627c59e07f
commit 0ac6639b95

View file

@ -346,16 +346,6 @@ static void F_IntroDrawScene(void)
// DRAW A FULL PIC INSTEAD OF FLAT!
if (intro_scenenum == 0)
{
if (finalecount == 8)
S_StartSound(NULL, sfx_vroom);
else if (finalecount == 47)
{
// Need to use M_Random otherwise it always uses the same sound
INT32 rskin = M_RandomKey(numskins);
UINT8 rtaunt = M_RandomKey(2);
sfxenum_t rsound = skins[rskin].soundsid[SKSKBST1+rtaunt];
S_StartSound(NULL, rsound);
}
background = W_CachePatchName("KARTKREW", PU_CACHE);
highres = true;
}
@ -454,6 +444,20 @@ void F_IntroTicker(void)
timetonext--;
if (intro_scenenum == 0)
{
if (finalecount == 8)
S_StartSound(NULL, sfx_vroom);
else if (finalecount == 47)
{
// Need to use M_Random otherwise it always uses the same sound
INT32 rskin = M_RandomKey(numskins);
UINT8 rtaunt = M_RandomKey(2);
sfxenum_t rsound = skins[rskin].soundsid[SKSKBST1+rtaunt];
S_StartSound(NULL, rsound);
}
}
F_WriteText();
// check for skipping