From fd529f93634252ed254c69d4c3439cfb34ba516e Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Sun, 3 Feb 2019 23:23:41 -0500 Subject: [PATCH] fickle suggestions --- src/k_kart.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 51bbccbb..b877e13f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5808,19 +5808,20 @@ void K_CheckSpectateStatus(void) if (cv_ingamecap.value) { UINT8 oldrespawnlist[MAXPLAYERS]; - - for (i = 0; i < numjoiners; i++) // copy old table before modifying - oldrespawnlist[i] = respawnlist[i]; - + memcpy(oldrespawnlist, respawnlist, numjoiners); for (i = 0; i < numjoiners; i++) { UINT8 pos = 0; + INT32 ispecwait = players[oldrespawnlist[i]].kartstuff[k_spectatewait]; for (j = 0; j < numjoiners; j++) { + INT32 jspecwait = players[oldrespawnlist[j]].kartstuff[k_spectatewait]; if (j == i) 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++; }