]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/scoreboard.qc
Merge remote-tracking branch 'origin/Mario/minstagib_powerups_fix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / scoreboard.qc
index 2bd37727d36d5bdac2bfa91bc659edbe746cd0f4..743e4b76d7bd9af97d949eab7a6027174b0c918b 100644 (file)
@@ -442,7 +442,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_title[0] = strzone(TranslateScoresLabel("name"));
                        hud_field[0] = SP_NAME;
                        ++hud_num_fields;
-                       print(sprintf(_("fixed missing field '%s'\n"), "name"));
+                       print("fixed missing field 'name'\n");
 
                        if(!have_separator)
                        {
@@ -457,7 +457,7 @@ void Cmd_HUD_SetFields(float argc)
                                hud_field[1] = SP_SEPARATOR;
                                hud_size[1] = stringwidth("|", FALSE, hud_fontsize);
                                ++hud_num_fields;
-                               print(sprintf(_("fixed missing field '%s'\n"), "|"));
+                               print("fixed missing field '|'\n");
                        }
                }
                else if(!have_separator)
@@ -467,7 +467,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth("|", FALSE, hud_fontsize);
                        hud_field[hud_num_fields] = SP_SEPARATOR;
                        ++hud_num_fields;
-                       print(sprintf(_("fixed missing field '%s'\n"), "|"));
+                       print("fixed missing field '|'\n");
                }
                if(!have_secondary)
                {
@@ -476,7 +476,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize);
                        hud_field[hud_num_fields] = ps_secondary;
                        ++hud_num_fields;
-                       print(sprintf(_("fixed missing field '%s'\n"), scores_label[ps_secondary]));
+                       print(sprintf("fixed missing field '%s'\n", scores_label[ps_secondary]));
                }
                if(!have_primary)
                {
@@ -485,7 +485,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize);
                        hud_field[hud_num_fields] = ps_primary;
                        ++hud_num_fields;
-                       print(sprintf(_("fixed missing field '%s'\n"), scores_label[ps_primary]));
+                       print(sprintf("fixed missing field '%s'\n", scores_label[ps_primary]));
                }
        }
 
@@ -947,7 +947,6 @@ float HUD_WouldDrawScoreboard() {
        return 0;
 }
 
-float g_minstagib;
 float average_accuracy;
 vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 {
@@ -962,6 +961,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        float fontsize = height * 1/3;
        float weapon_height = height * 2/3;
        float weapon_width = sbwidth / weapon_cnt;
+       float g_minstagib = 0;
 
        drawstring(pos, sprintf(_("Accuracy stats (average %d%%)"), average_accuracy), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_y += 1.25 * hud_fontsize_y + autocvar_scoreboard_border_thickness;
@@ -1393,10 +1393,24 @@ void HUD_DrawScoreboard()
                        respawn_time *= -1; // remove mark now that we checked it
                        respawn_time = max(time, respawn_time); // don't show a negative value while the server is respawning the player (lag)
                        
-                       str = sprintf(_("^1Respawning in ^3%s^1 seconds..."), ftos_decimals(respawn_time - time, autocvar_scoreboard_respawntime_decimals));
+                       str = sprintf(_("^1Respawning in ^3%s^1..."),
+                               (autocvar_scoreboard_respawntime_decimals ?
+                                       count_seconds_decs(respawn_time - time, autocvar_scoreboard_respawntime_decimals)
+                                       :
+                                       count_seconds(respawn_time - time)
+                               )
+                       );
                }
                else if(time < respawn_time)
-                       str = sprintf(_("You are dead, wait ^3%s^7 seconds before respawning"), ftos_decimals(respawn_time - time, autocvar_scoreboard_respawntime_decimals));
+               {
+                       str = sprintf(_("You are dead, wait ^3%s^7 before respawning"),
+                               (autocvar_scoreboard_respawntime_decimals ?
+                                       count_seconds_decs(respawn_time - time, autocvar_scoreboard_respawntime_decimals)
+                                       :
+                                       count_seconds(respawn_time - time)
+                               )
+                       );
+               }
                else if(time >= respawn_time)
                        str = sprintf(_("You are dead, press ^2%s^7 to respawn"), getcommandkey("jump", "+jump"));