]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2548 "FPS field is displayed (but empty) in the scoreboard with sv_showfps disabled"
authorterencehill <piuntn@gmail.com>
Tue, 6 Apr 2021 17:21:32 +0000 (19:21 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 6 Apr 2021 17:21:32 +0000 (19:21 +0200)
qcsrc/client/hud/panel/scoreboard.qc

index 39deff0d1c36e202696428237d93589679eb4195..6f41ae9ee7ea9e37db33be7de448d3a671a9c107 100644 (file)
@@ -463,9 +463,12 @@ void Cmd_Scoreboard_SetFields(int argc)
                                continue;
                }
 
+               str = strtolower(str);
+               if(!STAT(SHOWFPS) && str == "fps")
+                       continue;
+
                strcpy(sbt_field_title[sbt_num_fields], TranslateScoresLabel(str));
                sbt_field_size[sbt_num_fields] = stringwidth(sbt_field_title[sbt_num_fields], false, hud_fontsize);
-               str = strtolower(str);
 
                PlayerScoreField j;
                switch(str)