25 int armor,
health, fuel, air_time;
30 if(
hud != HUD_NORMAL)
return;
32 health = STAT(HEALTH);
68 air_time =
bound(0, STAT(AIR_FINISHED) -
time, 10);
98 if (!STAT(AIR_FINISHED))
100 else if (
time > STAT(AIR_FINISHED))
102 air_alpha =
blink_synced(0.5, 0.5, 7, STAT(AIR_FINISHED), -1);
109 float f = (STAT(AIR_FINISHED) -
time -
fade_time) / fade_time;
110 air_alpha =
bound(0, start_alpha + (1 - start_alpha) * (1 - f), 1);
119 float f = (100 - fuel) / 50;
120 fuel_alpha =
bound(0, start_alpha + (1 - start_alpha) * f, 1);
131 float hp =
floor(v.x + 1);
133 float maxtotal = maxhealth + maxarmor;
137 biggercount =
"health";
145 biggercount =
"armor";
152 DrawNumIcon(pos, mySize, hp, biggercount,
false,
false, iconalign,
HUD_Get_Num_Color(hp, maxtotal,
true), 1);
161 float panel_ar = mySize.x/mySize.y;
162 bool is_vertical = (panel_ar < 1);
163 vector health_offset =
'0 0 0', armor_offset =
'0 0 0';
164 if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
168 health_offset.x = mySize.x;
170 armor_offset.x = mySize.x;
176 health_offset.y = mySize.y;
178 armor_offset.y = mySize.y;
181 bool health_baralign, armor_baralign, fuel_baralign, air_align;
182 bool health_iconalign, armor_iconalign;
187 air_align = fuel_baralign = health_baralign;
195 air_align = fuel_baralign = armor_baralign;
204 float p_health, pain_health_alpha;
206 pain_health_alpha = 1;
243 pain_health_alpha =
blink(0.85, 0.15, 9);
249 DrawNumIcon(pos + health_offset, mySize, health,
"health", is_vertical,
false, health_iconalign,
HUD_Get_Num_Color(health, maxhealth,
true), 1);
254 float p_armor = armor;
296 DrawNumIcon(pos + armor_offset, mySize, armor,
"armor", is_vertical,
false, armor_iconalign,
HUD_Get_Num_Color(armor, maxarmor,
true), 1);
299 vector cell_size = mySize;
300 if (fuel || air_time)
308 else if (panel_ar < 1/4)
314 if (panel_ar > 1 && panel_ar < 4)
315 pos.y += cell_size.y;
316 else if (panel_ar > 1/4 && panel_ar <= 1)
317 pos.x += cell_size.x;
319 pos.x += cell_size.x - mySize.x;
321 pos.y += cell_size.y - mySize.y;
bool autocvar_hud_panel_healtharmor_dynamichud
#define draw_endBoldFont()
bool autocvar_hud_panel_healtharmor_combined
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
ERASEABLE float blink(float base, float range, float freq)
vector autocvar_hud_progressbar_armor_color
bool autocvar_hud_panel_healtharmor_flip
bool autocvar__hud_configure
#define draw_beginBoldFont()
vector autocvar_hud_progressbar_oxygen_color
float autocvar_hud_panel_healtharmor_progressbar_gfx_smooth
bool autocvar_hud_panel_healtharmor_progressbar_gfx
int autocvar_hud_panel_healtharmor_baralign
float autocvar_hud_panel_healtharmor_progressbar_gfx_lowhealth
void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool isInfinite, int icon_right_align, vector color, float theAlpha)
int autocvar_hud_panel_healtharmor_iconalign
float autocvar_hud_panel_healtharmor_fuelbar_startalpha
#define HUD_Panel_DrawBg()
float autocvar_hud_panel_healtharmor_oxygenbar_startalpha
#define drawpic_aspect_skin(pos, pic, sz, color, theAlpha, drawflag)
vector autocvar_hud_progressbar_fuel_color
vector autocvar_hud_progressbar_health_color
float autocvar_hud_panel_healtharmor_progressbar_gfx_damage
string autocvar_hud_panel_healtharmor_progressbar_armor
const float DRAWFLAG_NORMAL
int autocvar_hud_panel_healtharmor_maxhealth
ERASEABLE float blink_synced(float base, float range, float freq, float start_time, int start_pos)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
bool autocvar_hud_panel_healtharmor_progressbar
int autocvar_hud_panel_healtharmor_maxarmor
vector HUD_Get_Num_Color(float hp, float maxvalue, bool blink)
string autocvar_hud_panel_healtharmor_progressbar_health
bool autocvar_hud_panel_healtharmor
void HUD_HealthArmor_Export(int fh)
float autocvar_hud_progressbar_alpha
#define HUD_Write_Cvar(cvar)
bool autocvar_hud_panel_healtharmor_hide_ondeath
int autocvar_hud_panel_healtharmor_text
void HUD_Panel_LoadCvars()