]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix for hud observer color not neutral (it optimizes code too)
authorterencehill <piuntn@gmail.com>
Wed, 13 Mar 2013 08:32:14 +0000 (09:32 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 13 Mar 2013 08:40:38 +0000 (09:40 +0100)
qcsrc/client/hud.qc
qcsrc/client/hud.qh

index 82467348e588de0b7463885bf8e6de406566fb7b..6fb3174790eef1120e878047f1f614a66d1959ed 100644 (file)
@@ -4490,8 +4490,7 @@ void HUD_Main (void)
                vector color;
                float hud_dock_color_team = autocvar_hud_dock_color_team;
                if((teamplay) && hud_dock_color_team) {
-                       f = stof(getplayerkeyvalue(current_player - 1, "colors"));
-                       color = colormapPaletteColor(mod(f, 16), 1) * hud_dock_color_team;
+                       color = colormapPaletteColor(myteam, 1) * hud_dock_color_team;
                }
                else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && hud_dock_color_team) {
                        color = '1 0 0' * hud_dock_color_team;
index 90ece36ac0d77117d47fe83970f40c36585bebdd..bef2079b31920637c695ce579b4835d40281dab7 100644 (file)
@@ -126,7 +126,7 @@ if(!autocvar__hud_configure && panel_bg_str == "0") {\
 // Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
 #define HUD_Panel_GetColor()\
 if((teamplay) && panel_bg_color_team) {\
-       panel_bg_color = colormapPaletteColor(mod(stof(getplayerkeyvalue(current_player - 1, "colors")), 16), 1) * panel_bg_color_team;\
+       panel_bg_color = colormapPaletteColor(myteam, 1) * panel_bg_color_team;\
 } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team) {\
        panel_bg_color = '1 0 0' * panel_bg_color_team;\
 } else {\