mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Y_Ticker, roundqueue contexts: Fix for leaking existence of rank-restricted entries
The player pin jumping "clack" sound was improperly guarded from happening when reaching the end of a GP without accomplishing a Sealed Star.
This commit is contained in:
parent
bf0d0f39bc
commit
c752990720
1 changed files with 17 additions and 6 deletions
|
|
@ -1747,14 +1747,16 @@ void Y_Ticker(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Animation sounds for roundqueue, see Y_RoundQueueDrawer
|
// Animation sounds for roundqueue, see Y_RoundQueueDrawer
|
||||||
if (roundqueue.size != 0
|
if (roundqueue.size > 1
|
||||||
&& roundqueue.position != 0
|
&& roundqueue.position != 0
|
||||||
&& (timer - 1) <= 2*TICRATE)
|
&& (timer - 1) <= 2*TICRATE)
|
||||||
{
|
{
|
||||||
const INT32 through = ((2*TICRATE) - (timer - 1));
|
const INT32 through = ((2*TICRATE) - (timer - 1));
|
||||||
|
|
||||||
|
UINT8 workingqueuesize = roundqueue.size - 1;
|
||||||
|
|
||||||
if (data.showrank == true
|
if (data.showrank == true
|
||||||
&& roundqueue.position == roundqueue.size-1)
|
&& roundqueue.position == workingqueuesize)
|
||||||
{
|
{
|
||||||
// Handle special entry on the end
|
// Handle special entry on the end
|
||||||
if (through == data.linemeter && timer > 2)
|
if (through == data.linemeter && timer > 2)
|
||||||
|
|
@ -1767,13 +1769,22 @@ void Y_Ticker(void)
|
||||||
S_StartSound(NULL, sfx_gpmetr);
|
S_StartSound(NULL, sfx_gpmetr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (through == 9
|
else
|
||||||
&& roundqueue.position < roundqueue.size)
|
{
|
||||||
|
if (data.showrank == false
|
||||||
|
&& roundqueue.entries[workingqueuesize].rankrestricted == true)
|
||||||
|
{
|
||||||
|
workingqueuesize--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (through == 9
|
||||||
|
&& roundqueue.position <= workingqueuesize)
|
||||||
{
|
{
|
||||||
// Impactful landing
|
// Impactful landing
|
||||||
S_StartSound(NULL, sfx_kc50);
|
S_StartSound(NULL, sfx_kc50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (intertic < TICRATE || endtic != -1)
|
if (intertic < TICRATE || endtic != -1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue