- HUD_Panel_DrawProgressBar(panel_pos + acceleration_offset, panel_size, "accelbar", acceleration/autocvar_hud_panel_physics_acceleration_max, 0, acceleration_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+
+ f = acceleration/autocvar_hud_panel_physics_acceleration_max;
+ if (autocvar_hud_panel_physics_acceleration_progressbar_nonlinear)
+ f = sqrt(f);
+
+ if (acceleration_progressbar_scale) // allow progressbar to go out of panel bounds
+ {
+ tmp_size = acceleration_progressbar_scale * panel_size_x * eX + panel_size_y * eY;
+
+ if (acceleration_baralign == 1)
+ tmp_offset_x = panel_size_x - tmp_size_x;
+ else if (acceleration_baralign == 2 || acceleration_baralign == 3)
+ tmp_offset_x = (panel_size_x - tmp_size_x) / 2;
+ else
+ tmp_offset_x = 0;
+ tmp_offset_y = 0;
+ }
+ else
+ {
+ tmp_size = panel_size;
+ tmp_offset = '0 0 0';
+ }
+
+ HUD_Panel_DrawProgressBar(panel_pos + acceleration_offset + tmp_offset, tmp_size, "accelbar", f, 0, acceleration_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);