mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-14 08:50:33 +00:00
misc changes
This commit is contained in:
parent
211f0f0b5e
commit
61f5705510
1 changed files with 53 additions and 53 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.27 2002/05/27 07:00:09 niceass
|
||||||
|
// misc changes
|
||||||
|
//
|
||||||
// Revision 1.26 2002/05/12 02:21:06 niceass
|
// Revision 1.26 2002/05/12 02:21:06 niceass
|
||||||
// Matchmode scoreboard features
|
// Matchmode scoreboard features
|
||||||
//
|
//
|
||||||
|
@ -227,7 +230,7 @@ static int CG_TeamplayScoreboard(void)
|
||||||
int Ping, Frags, Damage; // Averages
|
int Ping, Frags, Damage; // Averages
|
||||||
char Tmp[128];
|
char Tmp[128];
|
||||||
|
|
||||||
vec4_t White, Black, RedL, BlueL, GreyL, BlackL;
|
vec4_t RedL, BlueL, GreyL, BlackL;
|
||||||
vec4_t RedD, BlueD, GreyD;
|
vec4_t RedD, BlueD, GreyD;
|
||||||
|
|
||||||
if (cg.time > cg.scoreStartTime+300) {
|
if (cg.time > cg.scoreStartTime+300) {
|
||||||
|
@ -245,9 +248,6 @@ static int CG_TeamplayScoreboard(void)
|
||||||
trap_SendClientCommand( "score" );
|
trap_SendClientCommand( "score" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MAKERGBA(White, 1.0f, 1.0f, 1.0f, 1.0f);
|
|
||||||
MAKERGBA(Black, 0.0f, 0.0f, 0.0f, 1.0f);
|
|
||||||
MAKERGBA(BlackL, 0.0f, 0.0f, 0.0f, 0.8f * Alpha);
|
MAKERGBA(BlackL, 0.0f, 0.0f, 0.0f, 0.8f * Alpha);
|
||||||
MAKERGBA(RedD, 0.8f, 0.0f,0.0f, 0.8f * Alpha);
|
MAKERGBA(RedD, 0.8f, 0.0f,0.0f, 0.8f * Alpha);
|
||||||
MAKERGBA(BlueD, 0.0f, 0.0f, 0.8f, 0.8f * Alpha);
|
MAKERGBA(BlueD, 0.0f, 0.0f, 0.8f, 0.8f * Alpha);
|
||||||
|
@ -274,30 +274,30 @@ static int CG_TeamplayScoreboard(void)
|
||||||
|
|
||||||
// MATCHMODE / TEAMPLAY for showing Referee
|
// MATCHMODE / TEAMPLAY for showing Referee
|
||||||
if ( cg_RQ3_matchmode.integer && cg_RQ3_RefID.integer >= 0) {
|
if ( cg_RQ3_matchmode.integer && cg_RQ3_RefID.integer >= 0) {
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, colorBlack);
|
||||||
ci = &cgs.clientinfo[ cg_RQ3_RefID.integer ];
|
ci = &cgs.clientinfo[ cg_RQ3_RefID.integer ];
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, "Referee:", 100, Black);
|
DrawLeftStripText(y, SB_FONTSIZEH, "Referee:", 100, colorBlack);
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, ci->name, 30, Black);
|
DrawRightStripText(y, SB_FONTSIZEH, ci->name, 30, colorBlack);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*4+2;
|
y += SB_FONTSIZEH+SB_PADDING*4+2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOT TEAMPLAY:
|
// NOT TEAMPLAY:
|
||||||
if (cg.scoreTPMode == 1 || cgs.gametype < GT_TEAM) {
|
if (cg.scoreTPMode == 1 || cgs.gametype < GT_TEAM) {
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlackL, White);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlackL, colorWhite);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, "Frags Name", 100, White);
|
DrawLeftStripText(y, SB_FONTSIZEH, "Frags Name", 100, colorWhite);
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Damage", 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Damage", 100, colorWhite);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
||||||
|
|
||||||
First = 0;
|
First = 0;
|
||||||
for ( i = 0 ; i < cg.numScores; i++ ) {
|
for ( i = 0 ; i < cg.numScores; i++ ) {
|
||||||
Score = &cg.scores[i];
|
Score = &cg.scores[i];
|
||||||
ci = &cgs.clientinfo[ Score->client ];
|
ci = &cgs.clientinfo[ Score->client ];
|
||||||
CG_DrawTeamplayClientScore(y, Score, GreyL, White, White);
|
CG_DrawTeamplayClientScore(y, Score, GreyL, colorWhite, colorWhite);
|
||||||
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, White);
|
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, colorWhite);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2;
|
y += SB_FONTSIZEH+SB_PADDING*2;
|
||||||
First = 1;
|
First = 1;
|
||||||
}
|
}
|
||||||
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, White);
|
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, colorWhite);
|
||||||
|
|
||||||
return Reds+Blues+ceil(Spectators/2)+Refs;
|
return Reds+Blues+ceil(Spectators/2)+Refs;
|
||||||
}
|
}
|
||||||
|
@ -305,21 +305,21 @@ static int CG_TeamplayScoreboard(void)
|
||||||
// *************** RED TEAM ***************
|
// *************** RED TEAM ***************
|
||||||
//trap_Cvar_VariableStringBuffer("g_RQ3_team1model", Tmp, sizeof(Tmp));
|
//trap_Cvar_VariableStringBuffer("g_RQ3_team1model", Tmp, sizeof(Tmp));
|
||||||
|
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, RedD, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, RedD, colorBlack);
|
||||||
trap_Cvar_VariableStringBuffer("g_RQ3_team1name", teamname, sizeof(teamname));
|
trap_Cvar_VariableStringBuffer("g_RQ3_team1name", teamname, sizeof(teamname));
|
||||||
DrawStripText(y, 50, SB_FONTSIZEH, teamname, 100, Black);
|
DrawStripText(y, 50, SB_FONTSIZEH, teamname, 100, colorBlack);
|
||||||
|
|
||||||
if ( cg_RQ3_matchmode.integer )
|
if ( cg_RQ3_matchmode.integer )
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, va("%s - Wins: %d",
|
DrawRightStripText(y, SB_FONTSIZEH, va("%s - Wins: %d",
|
||||||
cg_RQ3_team1ready.integer ? "Ready" : "Not Ready", cg.teamScores[0]), 100, White);
|
cg_RQ3_team1ready.integer ? "Ready" : "Not Ready", cg.teamScores[0]), 100, colorWhite);
|
||||||
else
|
else
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, va("Wins: %d", cg.teamScores[0]), 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, va("Wins: %d", cg.teamScores[0]), 100, colorWhite);
|
||||||
|
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
||||||
|
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, colorBlack);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, "Frags Name", 100, White);
|
DrawLeftStripText(y, SB_FONTSIZEH, "Frags Name", 100, colorWhite);
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Damage", 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Damage", 100, colorWhite);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
||||||
|
|
||||||
Ping = Frags = Damage = 0;
|
Ping = Frags = Damage = 0;
|
||||||
|
@ -333,8 +333,8 @@ static int CG_TeamplayScoreboard(void)
|
||||||
if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
|
if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
|
||||||
|
|
||||||
if (ci->team == TEAM_RED) {
|
if (ci->team == TEAM_RED) {
|
||||||
CG_DrawTeamplayClientScore(y, Score, RedL, Black, White);
|
CG_DrawTeamplayClientScore(y, Score, RedL, colorBlack, colorWhite);
|
||||||
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, RedL, Black);
|
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, RedL, colorBlack);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2;
|
y += SB_FONTSIZEH+SB_PADDING*2;
|
||||||
Ping += Score->ping;
|
Ping += Score->ping;
|
||||||
Frags += Score->score;
|
Frags += Score->score;
|
||||||
|
@ -343,38 +343,38 @@ static int CG_TeamplayScoreboard(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, RedL, Black);
|
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, RedL, colorBlack);
|
||||||
|
|
||||||
y += 2;
|
y += 2;
|
||||||
Com_sprintf(Tmp, 128, "%5d", Frags);
|
Com_sprintf(Tmp, 128, "%5d", Frags);
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, colorBlack);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, Tmp, 100, White);
|
DrawLeftStripText(y, SB_FONTSIZEH, Tmp, 100, colorWhite);
|
||||||
Com_sprintf(Tmp, 128, "%4d %6d", (int)((float)Ping / (float)Reds), Damage);
|
Com_sprintf(Tmp, 128, "%4d %6d", (int)((float)Ping / (float)Reds), Damage);
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, colorWhite);
|
||||||
DrawCenterStripText(y, SB_FONTSIZEH, "Averages", 20, White);
|
DrawCenterStripText(y, SB_FONTSIZEH, "Averages", 20, colorWhite);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, RedL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, RedL, colorBlack);
|
||||||
DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, White);
|
DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, colorWhite);
|
||||||
}
|
}
|
||||||
|
|
||||||
// *************** BLUE TEAM ************
|
// *************** BLUE TEAM ************
|
||||||
y += SB_FONTSIZEH*2;
|
y += SB_FONTSIZEH*2;
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueD, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueD, colorBlack);
|
||||||
trap_Cvar_VariableStringBuffer("g_RQ3_team2name", teamname, sizeof(teamname));
|
trap_Cvar_VariableStringBuffer("g_RQ3_team2name", teamname, sizeof(teamname));
|
||||||
DrawStripText(y, 50, SB_FONTSIZEH, teamname, 100, Black);
|
DrawStripText(y, 50, SB_FONTSIZEH, teamname, 100, colorBlack);
|
||||||
|
|
||||||
if ( cg_RQ3_matchmode.integer )
|
if ( cg_RQ3_matchmode.integer )
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, va("%s - Wins: %d",
|
DrawRightStripText(y, SB_FONTSIZEH, va("%s - Wins: %d",
|
||||||
cg_RQ3_team2ready.integer ? "Ready" : "Not Ready", cg.teamScores[1]), 100, White);
|
cg_RQ3_team2ready.integer ? "Ready" : "Not Ready", cg.teamScores[1]), 100, colorWhite);
|
||||||
else
|
else
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, va("Wins: %d", cg.teamScores[1]), 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, va("Wins: %d", cg.teamScores[1]), 100, colorWhite);
|
||||||
|
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
||||||
|
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, colorBlack);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, "Frags Name", 100, White);
|
DrawLeftStripText(y, SB_FONTSIZEH, "Frags Name", 100, colorWhite);
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Damage", 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Damage", 100, colorWhite);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
||||||
|
|
||||||
Ping = Frags = Damage = 0;
|
Ping = Frags = Damage = 0;
|
||||||
|
@ -388,8 +388,8 @@ static int CG_TeamplayScoreboard(void)
|
||||||
if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
|
if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
|
||||||
|
|
||||||
if (ci->team == TEAM_BLUE) {
|
if (ci->team == TEAM_BLUE) {
|
||||||
CG_DrawTeamplayClientScore(y, Score, BlueL, Black, White);
|
CG_DrawTeamplayClientScore(y, Score, BlueL, colorBlack, colorWhite);
|
||||||
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, BlueL, Black);
|
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, BlueL, colorBlack);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2;
|
y += SB_FONTSIZEH+SB_PADDING*2;
|
||||||
Ping += Score->ping;
|
Ping += Score->ping;
|
||||||
Frags += Score->score;
|
Frags += Score->score;
|
||||||
|
@ -397,20 +397,20 @@ static int CG_TeamplayScoreboard(void)
|
||||||
First = 1;
|
First = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, BlueL, Black);
|
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, BlueL, colorBlack);
|
||||||
|
|
||||||
y += 2;
|
y += 2;
|
||||||
|
|
||||||
Com_sprintf(Tmp, 128, "%5d", Frags);
|
Com_sprintf(Tmp, 128, "%5d", Frags);
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, colorBlack);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, Tmp, 100, White);
|
DrawLeftStripText(y, SB_FONTSIZEH, Tmp, 100, colorWhite);
|
||||||
Com_sprintf(Tmp, 128, "%4d %6d", (int)((float)Ping / (float)Blues), Damage);
|
Com_sprintf(Tmp, 128, "%4d %6d", (int)((float)Ping / (float)Blues), Damage);
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White);
|
DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, colorWhite);
|
||||||
DrawCenterStripText(y, SB_FONTSIZEH, "Averages", 20, White);
|
DrawCenterStripText(y, SB_FONTSIZEH, "Averages", 20, colorWhite);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueL, colorBlack);
|
||||||
DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, White);
|
DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, colorWhite);
|
||||||
}
|
}
|
||||||
|
|
||||||
// *************** SPECTATORS ************
|
// *************** SPECTATORS ************
|
||||||
|
@ -419,8 +419,8 @@ static int CG_TeamplayScoreboard(void)
|
||||||
First = 0;
|
First = 0;
|
||||||
|
|
||||||
y += SB_FONTSIZEH*2;
|
y += SB_FONTSIZEH*2;
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyD, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyD, colorBlack);
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, "Spectators", 100, Black);
|
DrawLeftStripText(y, SB_FONTSIZEH, "Spectators", 100, colorBlack);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
y += SB_FONTSIZEH+SB_PADDING*2+2;
|
||||||
|
|
||||||
for ( i = 0 ; i < cg.numScores; i++ ) {
|
for ( i = 0 ; i < cg.numScores; i++ ) {
|
||||||
|
@ -430,14 +430,14 @@ static int CG_TeamplayScoreboard(void)
|
||||||
if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
|
if (cg_RQ3_matchmode.integer && Score->client == cg_RQ3_RefID.integer) continue;
|
||||||
|
|
||||||
if (ci->team == TEAM_SPECTATOR) {
|
if (ci->team == TEAM_SPECTATOR) {
|
||||||
DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, GreyL, colorBlack);
|
||||||
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, Black);
|
if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, colorBlack);
|
||||||
|
|
||||||
if (Alternate == 1) {
|
if (Alternate == 1) {
|
||||||
DrawLeftStripText(y, SB_FONTSIZEH, ci->name, 20, White);
|
DrawLeftStripText(y, SB_FONTSIZEH, ci->name, 20, colorWhite);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DrawRightStripText(y, SB_FONTSIZEH, ci->name, 20, White);
|
DrawRightStripText(y, SB_FONTSIZEH, ci->name, 20, colorWhite);
|
||||||
y += SB_FONTSIZEH+SB_PADDING*2;
|
y += SB_FONTSIZEH+SB_PADDING*2;
|
||||||
}
|
}
|
||||||
Alternate = -Alternate;
|
Alternate = -Alternate;
|
||||||
|
@ -446,9 +446,9 @@ static int CG_TeamplayScoreboard(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Alternate == 1)
|
if (Alternate == 1)
|
||||||
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, Black);
|
DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, colorBlack);
|
||||||
else
|
else
|
||||||
DrawStrip(y, SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, Black);
|
DrawStrip(y, SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, colorBlack);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Reds+Blues+ceil(Spectators/2)+Refs;
|
return Reds+Blues+ceil(Spectators/2)+Refs;
|
||||||
|
|
Loading…
Reference in a new issue