Don't show (+ 0) for players that didn't get any points this round.
This commit is contained in:
parent
1f5f00da34
commit
c0a7891e60
|
@ -89,7 +89,7 @@ typedef union
|
||||||
INT32 numplayers; // Number of players being displayed
|
INT32 numplayers; // Number of players being displayed
|
||||||
char levelstring[62]; // holds levelnames up to 32 characters
|
char levelstring[62]; // holds levelnames up to 32 characters
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
int increase[MAXPLAYERS]; //how much did the score increase by?
|
UINT8 increase[MAXPLAYERS]; //how much did the score increase by?
|
||||||
UINT32 val[MAXPLAYERS]; //Gametype-specific value
|
UINT32 val[MAXPLAYERS]; //Gametype-specific value
|
||||||
UINT8 pos[MAXPLAYERS]; // player positions. used for ties
|
UINT8 pos[MAXPLAYERS]; // player positions. used for ties
|
||||||
boolean rankingsmode; // rankings mode
|
boolean rankingsmode; // rankings mode
|
||||||
|
@ -203,23 +203,24 @@ static void Y_CalculateMatchData(boolean rankingsmode, void (*comparison)(INT32)
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
if ((data.match.rankingsmode = rankingsmode))
|
if ((data.match.rankingsmode = rankingsmode))
|
||||||
sprintf(data.match.levelstring, "* Total Rankings *");
|
sprintf(data.match.levelstring, "* Total Rankings *");
|
||||||
else
|
|
||||||
memset(data.match.increase, 0, sizeof (data.match.increase));
|
|
||||||
for (j = 0; j < MAXPLAYERS; j++)
|
|
||||||
data.match.val[j] = UINT32_MAX;
|
|
||||||
memset(data.match.color, 0, sizeof (data.match.color));
|
|
||||||
memset(data.match.character, 0, sizeof (data.match.character));
|
|
||||||
memset(completed, 0, sizeof (completed));
|
|
||||||
data.match.numplayers = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
data.match.val[i] = UINT32_MAX;
|
||||||
|
if (!rankingsmode)
|
||||||
|
data.match.increase[i] = UINT8_MAX;
|
||||||
|
|
||||||
if (!playeringame[i] || players[i].spectator)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
numplayersingame++;
|
numplayersingame++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(data.match.color, 0, sizeof (data.match.color));
|
||||||
|
memset(data.match.character, 0, sizeof (data.match.character));
|
||||||
|
memset(completed, 0, sizeof (completed));
|
||||||
|
data.match.numplayers = 0;
|
||||||
|
|
||||||
for (j = 0; j < numplayersingame; j++)
|
for (j = 0; j < numplayersingame; j++)
|
||||||
{
|
{
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -243,7 +244,7 @@ static void Y_CalculateMatchData(boolean rankingsmode, void (*comparison)(INT32)
|
||||||
else
|
else
|
||||||
data.match.pos[data.match.numplayers] = data.match.numplayers+1;
|
data.match.pos[data.match.numplayers] = data.match.numplayers+1;
|
||||||
|
|
||||||
if (!rankingsmode && !(players[i].pflags & PF_TIMEOVER))
|
if (!rankingsmode && !(players[i].pflags & PF_TIMEOVER) && (data.match.pos[data.match.numplayers] != numplayersingame))
|
||||||
{
|
{
|
||||||
data.match.increase[i] = numplayersingame - data.match.pos[data.match.numplayers];
|
data.match.increase[i] = numplayersingame - data.match.pos[data.match.numplayers];
|
||||||
players[i].score += data.match.increase[i];
|
players[i].score += data.match.increase[i];
|
||||||
|
@ -413,17 +414,22 @@ void Y_IntermissionDrawer(void)
|
||||||
|
|
||||||
if (data.match.rankingsmode)
|
if (data.match.rankingsmode)
|
||||||
{
|
{
|
||||||
if (data.match.increase[data.match.num[i]] > 9)
|
if (data.match.increase[data.match.num[i]] != UINT8_MAX)
|
||||||
snprintf(strtime, sizeof strtime, "(+%02d)", data.match.increase[data.match.num[i]]);
|
{
|
||||||
else
|
if (data.match.increase[data.match.num[i]] > 9)
|
||||||
snprintf(strtime, sizeof strtime, "(+ %d)", data.match.increase[data.match.num[i]]);
|
snprintf(strtime, sizeof strtime, "(+%02d)", data.match.increase[data.match.num[i]]);
|
||||||
|
else
|
||||||
|
snprintf(strtime, sizeof strtime, "(+ %d)", data.match.increase[data.match.num[i]]);
|
||||||
|
|
||||||
if (data.match.numplayers > 8)
|
if (data.match.numplayers > 8)
|
||||||
V_DrawRightAlignedString(x+120, y, 0, strtime);
|
V_DrawRightAlignedString(x+120, y, 0, strtime);
|
||||||
else
|
else
|
||||||
V_DrawRightAlignedString(x+120+BASEVIDWIDTH/2, y, 0, strtime);
|
V_DrawRightAlignedString(x+120+BASEVIDWIDTH/2, y, 0, strtime);
|
||||||
|
|
||||||
snprintf(strtime, sizeof strtime, "%d", data.match.val[i]-data.match.increase[data.match.num[i]]);
|
snprintf(strtime, sizeof strtime, "%d", data.match.val[i]-data.match.increase[data.match.num[i]]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
snprintf(strtime, sizeof strtime, "%d", data.match.val[i]);
|
||||||
|
|
||||||
if (data.match.numplayers > 8)
|
if (data.match.numplayers > 8)
|
||||||
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
V_DrawRightAlignedString(x+152, y, 0, strtime);
|
||||||
|
@ -553,15 +559,15 @@ void Y_Ticker(void)
|
||||||
|
|
||||||
for (q = 0; q < data.match.numplayers; q++)
|
for (q = 0; q < data.match.numplayers; q++)
|
||||||
{
|
{
|
||||||
if (data.match.num[q] == MAXPLAYERS)
|
if (data.match.num[q] == MAXPLAYERS
|
||||||
|
|| !data.match.increase[data.match.num[q]]
|
||||||
|
|| data.match.increase[data.match.num[q]] == UINT8_MAX)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
data.match.increase[data.match.num[q]]--;
|
||||||
|
r++;
|
||||||
if (data.match.increase[data.match.num[q]])
|
if (data.match.increase[data.match.num[q]])
|
||||||
{
|
kaching = false;
|
||||||
data.match.increase[data.match.num[q]]--;
|
|
||||||
r++;
|
|
||||||
if (data.match.increase[data.match.num[q]])
|
|
||||||
kaching = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
|
|
Loading…
Reference in a new issue