From 2d6bad9761b2841d7cf6c7bbb96b0dfcf8923167 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 26 May 2007 10:19:37 +0000 Subject: [PATCH] intermission: store the current time to completed_time only on the first svc_intermission-like command (Nexuiz switches to svc_intermission for final scoreboard display and to svc_finale for the voting screen); intermission: in GAME_NEXUIZ, display standard scoreboard instead of intermission overlay, and allow showscores (TAB) to override svc_finale overlay scoreboard: in intermission, show the time when the game ended, not the current time git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7370 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 15 ++++++++++----- cl_screen.c | 5 +++++ sbar.c | 17 +++++++++++++++-- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index bedd95dd..4a06924c 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -3198,16 +3198,18 @@ void CL_ParseServerMessage(void) break; case qw_svc_intermission: + if(!cl.intermission) + cl.completed_time = cl.time; cl.intermission = 1; - cl.completed_time = cl.time; MSG_ReadVector(cl.qw_intermission_origin, cls.protocol); for (i = 0;i < 3;i++) cl.qw_intermission_angles[i] = MSG_ReadAngle(cls.protocol); break; case qw_svc_finale: + if(!cl.intermission) + cl.completed_time = cl.time; cl.intermission = 2; - cl.completed_time = cl.time; SCR_CenterPrint(MSG_ReadString ()); break; @@ -3654,19 +3656,22 @@ void CL_ParseServerMessage(void) break; case svc_intermission: + if(!cl.intermission) + cl.completed_time = cl.time; cl.intermission = 1; - cl.completed_time = cl.time; break; case svc_finale: + if(!cl.intermission) + cl.completed_time = cl.time; cl.intermission = 2; - cl.completed_time = cl.time; SCR_CenterPrint(MSG_ReadString ()); break; case svc_cutscene: + if(!cl.intermission) + cl.completed_time = cl.time; cl.intermission = 3; - cl.completed_time = cl.time; SCR_CenterPrint(MSG_ReadString ()); break; diff --git a/cl_screen.c b/cl_screen.c index b338efe5..7f53840b 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -112,6 +112,11 @@ void SCR_DrawCenterString (void) int remaining; int color; + if(gamemode == GAME_NEXUIZ) + if(cl.intermission == 2) // in Nexuiz finale (voting screen), + if(sb_showscores) // make TAB hide vote messages + return; + // the finale prints the characters one at a time, except if printspeed is an absurdly high value if (cl.intermission && scr_printspeed.value > 0 && scr_printspeed.value < 1000000) remaining = (int)(scr_printspeed.value * (cl.time - scr_centertime_start)); diff --git a/sbar.c b/sbar.c index 28cae4d6..6398a7a6 100644 --- a/sbar.c +++ b/sbar.c @@ -627,9 +627,11 @@ void Sbar_SoloScoreboard (void) char str[80], timestr[40]; int i, max; int minutes, seconds; + double t; - minutes = (int)(cl.time / 60); - seconds = (int)(cl.time - 60*floor(cl.time/60)); + t = (cl.intermission ? cl.completed_time : cl.time); + minutes = (int)(t / 60); + seconds = (int)(t - 60*floor(t/60)); // monsters and secrets are now both on the top row if (gamemode != GAME_NEXUIZ) @@ -1090,11 +1092,22 @@ void Sbar_Draw (void) { if (cl.intermission == 1) { + if(gamemode == GAME_NEXUIZ) // display full scoreboard (that is, show scores + map name) + { + Sbar_DrawScoreboard(); + return; + } Sbar_IntermissionOverlay(); return; } else if (cl.intermission == 2) { + if(gamemode == GAME_NEXUIZ) // Nexuiz allows TAB to override the voting screens to recall the scores + if(sb_showscores) + { + Sbar_DrawScoreboard(); + return; + } Sbar_FinaleOverlay(); return; } -- 2.39.2