]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
show "and" in scoreboard for leadlimit_and_fraglimit 1
authorMartin Taibr <taibr.martin@gmail.com>
Thu, 26 Mar 2020 15:46:07 +0000 (16:46 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Thu, 26 Mar 2020 15:46:07 +0000 (16:46 +0100)
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/common/stats.qh

index a6d1cc941708193c6696c3a2479a3641d26f0eda..9bdd22ca56a24626b9dfd8dddbef7644648ba2be 100644 (file)
@@ -1604,19 +1604,17 @@ void Scoreboard_Draw()
        draw_endBoldFont();
 
        // Game Info: Game Detail
-       float tl, fl, ll;
-       str = ""; // optionally "^7Limits: "
-       tl = STAT(TIMELIMIT);
-       fl = STAT(FRAGLIMIT);
-       ll = STAT(LEADLIMIT);
+       float tl = STAT(TIMELIMIT);
+       float fl = STAT(FRAGLIMIT);
+       float ll = STAT(LEADLIMIT);
+       float ll_and_fl = STAT(LEADLIMIT_AND_FRAGLIMIT);
+       str = "";
        if(tl > 0)
                str = strcat(str, sprintf(_("^3%1.0f minutes"), tl));
        if(!ISGAMETYPE(LMS))
        {
                if(fl > 0)
                {
-                       if(tl > 0)
-                               str = strcat(str, "^7 / "); // delimiter
                        if(teamplay)
                        {
                                str = strcat(str, sprintf(_("^5%s %s"), ScoreString(teamscores_flags(ts_primary), fl),
@@ -1634,8 +1632,17 @@ void Scoreboard_Draw()
                }
                if(ll > 0)
                {
+                       //if(tl > 0 || fl > 0)
+                       //      str = strcat(str, "^7 / "); // delimiter
                        if(tl > 0 || fl > 0)
-                               str = strcat(str, "^7 / "); // delimiter
+                       {
+                               // delimiter
+                               if (ll_and_fl)
+                                       str = strcat(str, "^7 and ");
+                               else
+                                       str = strcat(str, "^7 / ");
+                       }
+
                        if(teamplay)
                        {
                                str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(teamscores_flags(ts_primary), ll),
index 612e5b6cde29b84add48892088141f3a636544d3..245d92604e47c454d41da080e6f4daf996f0bf8e 100644 (file)
@@ -85,6 +85,7 @@ REGISTER_STAT(NB_METERSTART, float)
 /** compressShotOrigin */
 REGISTER_STAT(SHOTORG, int)
 REGISTER_STAT(LEADLIMIT, float, autocvar_leadlimit)
+REGISTER_STAT(LEADLIMIT_AND_FRAGLIMIT, float, autocvar_leadlimit_and_fraglimit)
 
 REGISTER_STAT(LAST_PICKUP, float)
 REGISTER_STAT(HUD, int)