if(startspeed >= 0 && text_alpha > 0 && autocvar_hud_panel_strafehud_startspeed_size > 0)
{
vector startspeed_size = panel_size;
- startspeed_size.y = panel_size.y * min(autocvar_hud_panel_strafehud_startspeed_size, 5);
+ startspeed_size.y = autocvar_hud_panel_strafehud_startspeed_size;
+ if(!autocvar_hud_panel_strafehud_uncapped)
+ startspeed_size.y = min(startspeed_size.y, 10);
+ startspeed_size.y *= panel_size.y;
+ if(!autocvar_hud_panel_strafehud_uncapped)
+ startspeed_size.y = max(startspeed_size.y, 1);
+
+ float text_offset = 0;
+ if((autocvar_hud_panel_strafehud_angle_alpha * panel_fg_alpha > 0) || (autocvar_hud_panel_strafehud_bestangle && autocvar_hud_panel_strafehud_bestangle_alpha * panel_fg_alpha > 0))
+ {
+ text_offset = (angleheight_offset - panel_size.y) / 2;
+ if(arrow_size > 0 && autocvar_hud_panel_strafehud_angle_arrow >= 2)
+ text_offset += arrow_size;
+ // make sure text doesn't draw inside the strafehud bar
+ text_offset = max(text_offset, 0);
+ }
+
+ string speed_unit = GetSpeedUnit(autocvar_hud_panel_strafehud_unit);
- drawstring_aspect(panel_pos + eY * panel_size.y, strcat(ftos_decimals(startspeed * speed_conversion_factor, 2), autocvar_hud_panel_strafehud_unit_show ? speed_unit : ""), startspeed_size, autocvar_hud_panel_strafehud_startspeed_color, text_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(panel_pos + eY * (panel_size.y + text_offset), strcat(ftos_decimals(startspeed * speed_conversion_factor, 2), autocvar_hud_panel_strafehud_unit_show ? speed_unit : ""), startspeed_size, autocvar_hud_panel_strafehud_startspeed_color, text_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
}
else
if(jumpheight_persistent > 0 && text_alpha > 0 && autocvar_hud_panel_strafehud_jumpheight_size > 0)
{
vector jumpheight_size = panel_size;
- jumpheight_size.y = panel_size.y * min(autocvar_hud_panel_strafehud_jumpheight_size, 5);
+ jumpheight_size.y = autocvar_hud_panel_strafehud_jumpheight_size;
+ if(!autocvar_hud_panel_strafehud_uncapped)
+ jumpheight_size.y = min(jumpheight_size.y, 10);
+ jumpheight_size.y *= panel_size.y;
+ if(!autocvar_hud_panel_strafehud_uncapped)
+ jumpheight_size.y = max(jumpheight_size.y, 1);
+
+ float text_offset = 0;
+ if((autocvar_hud_panel_strafehud_angle_alpha * panel_fg_alpha > 0) || (autocvar_hud_panel_strafehud_bestangle && autocvar_hud_panel_strafehud_bestangle_alpha * panel_fg_alpha > 0))
+ {
+ text_offset = (angleheight_offset - panel_size.y) / 2;
+ if(arrow_size > 0 && autocvar_hud_panel_strafehud_angle_arrow == 1 || autocvar_hud_panel_strafehud_angle_arrow >= 3)
+ text_offset += arrow_size;
+ // make sure text doesn't draw inside the strafehud bar
+ text_offset = max(text_offset, 0);
+ }
+
+ string length_unit = GetLengthUnit(autocvar_hud_panel_strafehud_unit);
- drawstring_aspect(panel_pos - eY * jumpheight_size.y, strcat(ftos_decimals(jumpheight_persistent * length_conversion_factor, length_decimals), autocvar_hud_panel_strafehud_unit_show ? length_unit : ""), jumpheight_size, autocvar_hud_panel_strafehud_jumpheight_color, text_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(panel_pos - eY * (jumpheight_size.y + text_offset), strcat(ftos_decimals(jumpheight_persistent * length_conversion_factor, length_decimals), autocvar_hud_panel_strafehud_unit_show ? length_unit : ""), jumpheight_size, autocvar_hud_panel_strafehud_jumpheight_color, text_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
}
else