mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-24 02:01:17 +00:00
Fix it team scoreboard properly
This commit is contained in:
parent
d92e293385
commit
be9adc3883
1 changed files with 5 additions and 1 deletions
|
@ -1623,6 +1623,7 @@ static void Y_CalculateMatchWinners(void)
|
|||
boolean completed[MAXPLAYERS];
|
||||
|
||||
// Initialize variables
|
||||
memset(data.match.ctfteam, 0, sizeof (data.match.ctfteam));
|
||||
memset(data.match.scores, 0, sizeof (data.match.scores));
|
||||
memset(data.match.color, 0, sizeof (data.match.color));
|
||||
memset(data.match.character, 0, sizeof (data.match.character));
|
||||
|
@ -1643,8 +1644,12 @@ static void Y_CalculateMatchWinners(void)
|
|||
|
||||
if (players[i].score >= data.match.scores[data.match.numplayers] && completed[i] == false)
|
||||
{
|
||||
data.match.ctfteam[data.match.numplayers] = players[i].ctfteam;
|
||||
data.match.scores[data.match.numplayers] = players[i].score;
|
||||
data.match.color[data.match.numplayers] = &players[i].skincolor;
|
||||
if (data.match.ctfteam[data.match.numplayers] == 1) { data.match.color[data.match.numplayers] = &skincolor_redteam; } // red team
|
||||
else if (data.match.ctfteam[data.match.numplayers] == 2) { data.match.color[data.match.numplayers] = &skincolor_blueteam; } // blue team
|
||||
|
||||
data.match.character[data.match.numplayers] = &players[i].skin;
|
||||
data.match.name[data.match.numplayers] = player_names[i];
|
||||
data.match.spectator[data.match.numplayers] = players[i].spectator;
|
||||
|
@ -1688,7 +1693,6 @@ static void Y_CalculateTimeRaceWinners(void)
|
|||
|
||||
if (players[i].realtime <= data.match.scores[data.match.numplayers] && completed[i] == false)
|
||||
{
|
||||
data.match.ctfteam[data.match.numplayers] = players[i].ctfteam;
|
||||
data.match.scores[data.match.numplayers] = players[i].realtime;
|
||||
data.match.color[data.match.numplayers] = &players[i].skincolor;
|
||||
data.match.character[data.match.numplayers] = &players[i].skin;
|
||||
|
|
Loading…
Reference in a new issue