- if((jumptime > 0) && ((time - jumptime) <= autocvar_hud_panel_strafehud_jumpheight_fade))
- {
- float text_alpha = cos(((time - jumptime) / autocvar_hud_panel_strafehud_jumpheight_fade) * 90 * DEG2RAD); // fade non-linear like the physics panel does
- vector jumpheight_size = panel_size;
- 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);
- }
+ float jumpheight_height = autocvar_hud_panel_strafehud_jumpheight_size * panel_size.y;
+ string jumpheight_text = ftos_decimals(jumpheight * length_conversion_factor, length_decimals);
+ if(autocvar_hud_panel_strafehud_unit_show)
+ jumpheight_text = strcat(jumpheight_text, GetLengthUnit(autocvar_hud_panel_strafehud_unit));