mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
fickle suggestions
This commit is contained in:
parent
98af218d2c
commit
fd529f9363
1 changed files with 6 additions and 5 deletions
11
src/k_kart.c
11
src/k_kart.c
|
@ -5808,19 +5808,20 @@ void K_CheckSpectateStatus(void)
|
||||||
if (cv_ingamecap.value)
|
if (cv_ingamecap.value)
|
||||||
{
|
{
|
||||||
UINT8 oldrespawnlist[MAXPLAYERS];
|
UINT8 oldrespawnlist[MAXPLAYERS];
|
||||||
|
memcpy(oldrespawnlist, respawnlist, numjoiners);
|
||||||
for (i = 0; i < numjoiners; i++) // copy old table before modifying
|
|
||||||
oldrespawnlist[i] = respawnlist[i];
|
|
||||||
|
|
||||||
for (i = 0; i < numjoiners; i++)
|
for (i = 0; i < numjoiners; i++)
|
||||||
{
|
{
|
||||||
UINT8 pos = 0;
|
UINT8 pos = 0;
|
||||||
|
INT32 ispecwait = players[oldrespawnlist[i]].kartstuff[k_spectatewait];
|
||||||
|
|
||||||
for (j = 0; j < numjoiners; j++)
|
for (j = 0; j < numjoiners; j++)
|
||||||
{
|
{
|
||||||
|
INT32 jspecwait = players[oldrespawnlist[j]].kartstuff[k_spectatewait];
|
||||||
if (j == i)
|
if (j == i)
|
||||||
continue;
|
continue;
|
||||||
if (players[oldrespawnlist[j]].kartstuff[k_spectatewait] > players[oldrespawnlist[i]].kartstuff[k_spectatewait])
|
if (jspecwait > ispecwait)
|
||||||
|
pos++;
|
||||||
|
else if (jspecwait == ispecwait && j < i)
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue