mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
K_FadeOutSpecialMusic: Iterate over all display players in K_TickSpecialStage, instead of clobbering the volume in K_KartUpdatePosition
Prevents weird audio clipping near the end of the course
This commit is contained in:
parent
e9205e19d6
commit
a752ed095f
2 changed files with 13 additions and 6 deletions
|
|
@ -11143,12 +11143,6 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
player->topinfirst = 0;
|
player->topinfirst = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special stages: fade out music near the finish line
|
|
||||||
if (P_IsPartyPlayer(player))
|
|
||||||
{
|
|
||||||
K_FadeOutSpecialMusic(player->distancetofinish);
|
|
||||||
}
|
|
||||||
|
|
||||||
player->position = position;
|
player->position = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,19 @@ void K_TickSpecialStage(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Special stages: fade out music near the finish line
|
||||||
|
UINT8 i;
|
||||||
|
UINT32 lowestdistance = UINT32_MAX;
|
||||||
|
for (i = 0; i <= r_splitscreen; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[displayplayers[i]] || players[displayplayers[i]].spectator)
|
||||||
|
continue;
|
||||||
|
if (players[displayplayers[i]].distancetofinish >= lowestdistance)
|
||||||
|
continue;
|
||||||
|
lowestdistance = players[displayplayers[i]].distancetofinish;
|
||||||
|
}
|
||||||
|
K_FadeOutSpecialMusic(lowestdistance);
|
||||||
|
|
||||||
if (P_MobjWasRemoved(specialstageinfo.ufo))
|
if (P_MobjWasRemoved(specialstageinfo.ufo))
|
||||||
{
|
{
|
||||||
P_SetTarget(&specialstageinfo.ufo, NULL);
|
P_SetTarget(&specialstageinfo.ufo, NULL);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue