]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Remove deprecated buff HUD panel and associated cvars
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index cff29ca8c2a07c6803eeed3e5a3fd9979284cfb3..9e678343b460e629ea336cc9e7b405016f4de995 100644 (file)
@@ -4578,72 +4578,6 @@ void HUD_CenterPrint (void)
        }
 }
 
-// Buffs (#18)
-//
-void HUD_Buffs(void)
-{
-       int buffs = getstati(STAT_BUFFS, 0, 24);
-       if(!autocvar__hud_configure)
-       {
-               if(!autocvar_hud_panel_buffs) return;
-               if(spectatee_status == -1) return;
-               if(getstati(STAT_HEALTH) <= 0) return;
-               if(!buffs) return;
-       }
-       else
-       {
-               buffs = Buff_Type_first.items; // force first buff
-       }
-
-       int b = 0; // counter to tell other functions that we have buffs
-       entity e;
-       string s = "";
-       for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items)
-       {
-               ++b;
-               string o = strcat(rgb_to_hexcolor(Buff_Color(e.items)), Buff_PrettyName(e.items));
-               if(s == "")
-                       s = o;
-               else
-                       s = strcat(s, " ", o);
-       }
-
-       HUD_Panel_UpdateCvars();
-
-
-       vector pos, mySize;
-       pos = panel_pos;
-       mySize = panel_size;
-
-       HUD_Panel_DrawBg(bound(0, b, 1));
-       if(panel_bg_padding)
-       {
-               pos += '1 1 0' * panel_bg_padding;
-               mySize -= '2 2 0' * panel_bg_padding;
-       }
-
-       //float panel_ar = mySize_x/mySize_y;
-       //bool is_vertical = (panel_ar < 1);
-       //float buff_iconalign = autocvar_hud_panel_buffs_iconalign;
-       vector buff_offset = '0 0 0';
-
-       draw_beginBoldFont();
-       float buff_time, buff_maxtime;
-       buff_time = bound(0, getstatf(STAT_BUFF_TIME) - time, 99);
-       buff_maxtime = 60; // TODO: stat?
-       for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items)
-       {
-               if(buff_time && autocvar_hud_panel_buffs_progressbar)
-                       HUD_Panel_DrawProgressBar(pos + buff_offset, mySize, autocvar_hud_panel_buffs_progressbar_name, buff_time/buff_maxtime, 0, 0,
-                                                                         Buff_Color(e.items) * -1 + '1 1 1', (autocvar_hud_progressbar_alpha * panel_fg_alpha) * 0.4, DRAWFLAG_NORMAL);
-
-               //DrawNumIcon(pos + buff_offset, mySize, shield, "shield", is_vertical, buff_iconalign, '1 1 1', 1);
-               drawcolorcodedstring_aspect(pos + buff_offset, s, mySize, panel_fg_alpha * 0.5, DRAWFLAG_NORMAL);
-       }
-
-       draw_endBoldFont();
-}
-
 
 /*
 ==================