]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
intermission: store the current time to completed_time only on the first svc_intermis...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 May 2007 10:19:37 +0000 (10:19 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 May 2007 10:19:37 +0000 (10:19 +0000)
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
cl_screen.c
sbar.c

index bedd95dda67fe092b4ec12ae8a284691128ff45e..4a06924c29b283b946280d47b4798a2ad038740e 100644 (file)
@@ -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;
 
index b338efe564fe9f641114aff7e040b39fd244aed7..7f53840b751c51e2dad92edf988b9758d3cc8bfa 100644 (file)
@@ -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 28cae4d601e6ae49fbc854d020d41476d2eaadbe..6398a7a625439a43d868e0ac2d84fa8137f735c3 100644 (file)
--- 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;
                }