25 int armor,
health, fuel, air_time;
98 if (!
STAT(AIR_FINISHED))
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;
242 pain_health_alpha =
blink(0.85, 0.15, 9);
247 DrawNumIcon(pos + health_offset, mySize,
health,
"health", is_vertical,
false, health_iconalign,
HUD_Get_Num_Color(
health, maxhealth,
true), 1);
252 float p_armor = armor;
293 DrawNumIcon(pos + armor_offset, mySize, armor,
"armor", is_vertical,
false, armor_iconalign,
HUD_Get_Num_Color(armor, maxarmor,
true), 1);
296 vector cell_size = mySize;
297 if (fuel || air_time)
305 else if (panel_ar < 1/4)
311 if (panel_ar > 1 && panel_ar < 4)
312 pos.y += cell_size.y;
313 else if (panel_ar > 1/4 && panel_ar <= 1)
314 pos.x += cell_size.x;
316 pos.x += cell_size.x - mySize.x;
318 pos.y += cell_size.y - mySize.y;
int spectatee_status
the -1 disables HUD panels before CSQC receives necessary data
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool isInfinite, int icon_right_align, vector color, float theAlpha)