Merge branch 'master' into Mario/entcs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qh
index 7ee177524bea40d90eb5c547183ddba56a7859a4..3aa5d8f8c9071996445568e3d33f0621ba61f27d 100644 (file)
@@ -280,9 +280,9 @@ REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    scoreboard,     PANEL_CO
                        panel_bg_color = autocvar_hud_panel_bg_color;                                                           \
                } else {                                                                                                    \
                        if (panel_bg_color_str == "shirt") {                                                                    \
-                               panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player, "colors")) / 16), 0); \
+                               panel_bg_color = colormapPaletteColor(floor(entcs_GetClientColors(current_player) / 16), 0); \
                        } else if (panel_bg_color_str == "pants") {                                                             \
-                               panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player, "colors")) % 16, 1); \
+                               panel_bg_color = colormapPaletteColor(entcs_GetClientColors(current_player) % 16, 1); \
                        } else {                                                                                                \
                                panel_bg_color = stov(panel_bg_color_str);                                                          \
                        }                                                                                                       \