ref ready code

This commit is contained in:
Bryce Hutchings 2002-10-21 21:01:49 +00:00
parent 4d96b77fbe
commit 89fb97366c
2 changed files with 29 additions and 37 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.48 2002/10/21 21:01:49 niceass
// ref ready code
//
// Revision 1.47 2002/08/29 04:45:25 niceass
// color changes for new outlined font
//
@ -395,29 +398,25 @@ static int CG_TeamplayScoreboard(void)
RedD[1] *= 0.8f;
RedD[2] *= 0.8f;
RedD[3] *= (0.8f * Alpha);
//MAKERGBA(RedD, 0.8f, 0.0f, 0.0f, 0.8f * Alpha);
CG_TeamColor(TEAM_BLUE, BlueD);
BlueD[0] *= 0.8f;
BlueD[1] *= 0.8f;
BlueD[2] *= 0.8f;
BlueD[3] *= (0.8f * Alpha);
//MAKERGBA(BlueD, 0.0f, 0.0f, 0.8f, 0.8f * Alpha);
MAKERGBA(GreyD, 0.3f, 0.3f, 0.3f, 0.84f * Alpha);
CG_TeamColor(TEAM_RED, RedL);
RedL[0] *= 0.8f;
RedL[1] *= 0.8f;
RedL[2] *= 0.8f;
RedL[3] *= (0.8f * Alpha);
//MAKERGBA(RedL, 0.8f, 0.0f, 0.0f, 0.4f * Alpha);
CG_TeamColor(TEAM_BLUE, BlueL);
BlueL[0] *= 0.8f;
BlueL[1] *= 0.8f;
BlueL[2] *= 0.8f;
BlueL[3] *= (0.8f * Alpha);
//MAKERGBA(BlueL, 0.0f, 0.0f, 0.8f, 0.4f * Alpha);
MAKERGBA(GreyL, 0.3f, 0.3f, 0.3f, 0.4f * Alpha);
Reds = Blues = Spectators = RedSubs = BlueSubs = 0;
Reds = Blues = Spectators = RedSubs = BlueSubs = refs = 0;
// Get totals for red/blue/spectators and subs
for (i = 0; i < cg.numScores; i++) {
@ -457,17 +456,6 @@ static int CG_TeamplayScoreboard(void)
y += SB_FONTSIZEH + SB_PADDING * 2 + 2;
}
// NiceAss: Matchmode stuff for showing Referee
/*
if (cg_RQ3_matchmode.integer && cg.refID >= 0) {
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, colorBlack);
ci = &cgs.clientinfo[cg.refID];
DrawLeftStripText(y, SB_FONTSIZEH, "Referee:", 100, colorBlack);
DrawRightStripText(y, SB_FONTSIZEH, ci->name, 30, colorBlack);
y += SB_FONTSIZEH + SB_PADDING * 4 + 2;
}
*/
// NiceAss: Deathmatch scoreboard:
if (cg.scoreTPMode == 1 || cgs.gametype < GT_TEAM) {
vec3_t headAngles;
@ -484,10 +472,6 @@ static int CG_TeamplayScoreboard(void)
ci = &cgs.clientinfo[Score->client];
CG_DrawTeamplayClientScore(y, Score, GreyL, colorWhite, colorWhite);
/* if (ci->team != TEAM_SPECTATOR)
CG_DrawHead((SCREEN_WIDTH + SB_WIDTH) / 2, y, SB_FONTSIZEH + SB_PADDING * 2+1,
SB_FONTSIZEH + SB_PADDING * 2+1, Score->client, headAngles);
*/
if (First == 0)
DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, colorWhite);
@ -554,7 +538,6 @@ static int CG_TeamplayScoreboard(void)
Score = &cg.scores[i];
ci = &cgs.clientinfo[Score->client];
//if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
if (ci->team == TEAM_RED && Score->sub) {
CG_DrawTeamplayClientScore(y, Score, RedL, colorBlack, colorWhite);
if (First == 0)
@ -591,10 +574,7 @@ static int CG_TeamplayScoreboard(void)
// *************** BLUE TEAM ************
y += SB_FONTSIZEH * 2;
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueD, colorBlack);
//if (cgs.gametype == GT_CTF)
DrawLeftStripText(y, SB_FONTSIZEH, cg_RQ3_team2name.string, 100, colorWhite);
//else
// DrawLeftStripText(y, SB_FONTSIZEH, cg_RQ3_team2name.string, 100, colorBlack);
if (cg_RQ3_matchmode.integer)
DrawRightStripText(y, SB_FONTSIZEH, va("%d/%d - %s - Wins: %d", Blues, BlueSubs,
@ -675,6 +655,14 @@ static int CG_TeamplayScoreboard(void)
DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, colorWhite);
}
if ( cg_RQ3_matchmode.integer && cg.refready != -1 ) {
y += 4;
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlackL, colorWhite);
DrawRightStripText(y, SB_FONTSIZEH,
cg.refready ? "Referee Ready" : "Referee Not Ready", 100, colorWhite);
y += SB_FONTSIZEH + SB_PADDING * 2 + 6;
}
// *************** SPECTATORS ************
if (Spectators) {
Alternate = 1;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.68 2002/10/21 21:01:49 niceass
// ref ready code
//
// Revision 1.67 2002/09/29 16:06:44 jbravo
// Work done at the HPWorld expo
//
@ -229,23 +232,24 @@ static void CG_ParseScores(void)
cg.teamScores[1] = atoi(CG_Argv(3));
cg.team1ready = atoi(CG_Argv(4));
cg.team2ready = atoi(CG_Argv(5));
cg.matchTime = atoi(CG_Argv(6));
cg.refready = atoi(CG_Argv(6));
cg.matchTime = atoi(CG_Argv(7));
memset(cg.scores, 0, sizeof(cg.scores));
for (i = 0; i < cg.numScores; i++) {
//Elder: Leave as-is ... sent zeros by server
cg.scores[i].client = atoi(CG_Argv(i * 12 + 7));
cg.scores[i].score = atoi(CG_Argv(i * 12 + 8));
cg.scores[i].ping = atoi(CG_Argv(i * 12 + 9));
cg.scores[i].time = atoi(CG_Argv(i * 12 + 10));
cg.scores[i].client = atoi(CG_Argv(i * 12 + 8));
cg.scores[i].score = atoi(CG_Argv(i * 12 + 9));
cg.scores[i].ping = atoi(CG_Argv(i * 12 + 10));
cg.scores[i].time = atoi(CG_Argv(i * 12 + 11));
cg.scores[i].scoreFlags = atoi(CG_Argv(i * 12 + 12));
powerups = atoi(CG_Argv(i * 12 + 12));
cg.scores[i].accuracy = atoi(CG_Argv(i * 12 + 13));
cg.scores[i].damage = atoi(CG_Argv(i * 12 + 14));
cg.scores[i].alive = atoi(CG_Argv(i * 12 + 15));
cg.scores[i].captain = atoi(CG_Argv(i * 12 + 16));
cg.scores[i].sub = atoi(CG_Argv(i * 12 + 17));
cg.scores[i].referee = atoi(CG_Argv(i * 12 + 18));
powerups = atoi(CG_Argv(i * 12 + 13));
cg.scores[i].accuracy = atoi(CG_Argv(i * 12 + 14));
cg.scores[i].damage = atoi(CG_Argv(i * 12 + 15));
cg.scores[i].alive = atoi(CG_Argv(i * 12 + 16));
cg.scores[i].captain = atoi(CG_Argv(i * 12 + 17));
cg.scores[i].sub = atoi(CG_Argv(i * 12 + 18));
cg.scores[i].referee = atoi(CG_Argv(i * 12 + 19));
if (cg.scores[i].client < 0 || cg.scores[i].client >= MAX_CLIENTS) {
cg.scores[i].client = 0;