From b718d0169da5a6bd14821281254fc64e0803e555 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Sat, 30 Mar 2002 02:54:24 +0000 Subject: [PATCH] MOre spec tweaks and a scoreboard fix --- reaction/cgame/cg_scoreboard.c | 23 +++++++++++++++-------- reaction/game/g_active.c | 7 +++++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/reaction/cgame/cg_scoreboard.c b/reaction/cgame/cg_scoreboard.c index fd13902c..9490f599 100644 --- a/reaction/cgame/cg_scoreboard.c +++ b/reaction/cgame/cg_scoreboard.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.18 2002/03/30 02:54:24 jbravo +// MOre spec tweaks and a scoreboard fix +// // Revision 1.17 2002/03/24 22:57:27 niceass // VERY big scoreboard changes // @@ -269,10 +272,12 @@ static int CG_TeamplayScoreboard(void) } y += 2; - Com_sprintf(Tmp, 128, "%4d %5d %6d", (int)((float)Ping / (float)Reds), Frags, Damage); - DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); - DrawLeftStripText(y, SB_FONTSIZEH, "Averages/Totals:", 100, White); - DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White); + if (Reds) { + Com_sprintf(Tmp, 128, "%4d %5d %6d", (int)((float)Ping / (float)Reds), Frags, Damage); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Averages/Totals:", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White); + } y += SB_FONTSIZEH+SB_PADDING*2; // *************** BLUE TEAM ************ @@ -315,10 +320,12 @@ static int CG_TeamplayScoreboard(void) } y += 2; - Com_sprintf(Tmp, 128, "%4d %5d %6d", (int)((float)Ping / (float)Blues), Frags, Damage ); - DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); - DrawLeftStripText(y, SB_FONTSIZEH, "Averages/Totals:", 100, White); - DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White); + if (Blues) { + Com_sprintf(Tmp, 128, "%4d %5d %6d", (int)((float)Ping / (float)Blues), Frags, Damage ); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Averages/Totals:", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White); + } y += SB_FONTSIZEH+SB_PADDING*2; // *************** SPECTATORS ************ diff --git a/reaction/game/g_active.c b/reaction/game/g_active.c index e3b82057..0f09df76 100644 --- a/reaction/game/g_active.c +++ b/reaction/game/g_active.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.64 2002/03/30 02:54:24 jbravo +// MOre spec tweaks and a scoreboard fix +// // Revision 1.63 2002/03/30 02:29:43 jbravo // Lots of spectator code updates. Removed debugshit, added some color. // @@ -580,7 +583,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) { // Attack Button cycles throught free view, follow or zcam if((ucmd->buttons & BUTTON_ATTACK) && !(client->oldbuttons & BUTTON_ATTACK)) { - if (client->sess.spectatorState == SPECTATOR_FREE) { + if (client->sess.spectatorState == SPECTATOR_FREE && OKtoFollow(clientNum)) { client->sess.spectatorState = SPECTATOR_ZCAM; client->specMode = SPECTATOR_ZCAM; client->ps.stats[STAT_RQ3] |= RQ3_ZCAM; @@ -594,7 +597,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) { client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM; Cmd_FollowCycle_f(ent, 1); RQ3_SpectatorMode(ent); - } else { + } else if (client->sess.spectatorState == SPECTATOR_FOLLOW) { client->sess.spectatorState = SPECTATOR_FREE; client->specMode = SPECTATOR_FREE; client->ps.pm_flags &= ~PMF_FOLLOW;