seta hud_panel_engineinfo_framecounter_time "0.1" "time between framerate display updates"
seta hud_panel_physics_acceleration_movingaverage "1" "use an averaging method for calculating acceleration instead of the real value"
+seta hud_panel_physics_acceleration_max_slick "-1" "acceleration progressbar gets completely filled up by this value (in g) while on slick, -1 = same as the normal max"
seta hud_panel_physics_update_interval "0.016" "how often (in seconds) numeric values get updated on screen"
seta hud_panel_physics_jumpspeed "0" "also show jump speed, replacing the speed unit text"
seta hud_panel_physics_jumpspeed_time "1" "how many seconds the jump speed takes to fade out"
draw_beginBoldFont();
+ bool onslick = false;
+ if(IS_ONGROUND(csqcplayer))
+ {
+ if(PHYS_FRICTION(csqcplayer) == 0)
+ onslick = true;
+ else // don't use IS_ONSLICK(), it only works for the local player and only if client prediction is enabled
+ {
+ trace_dphitq3surfaceflags = 0;
+ tracebox(csqcplayer.origin, csqcplayer.mins, csqcplayer.maxs, csqcplayer.origin - '0 0 1', MOVE_NOMONSTERS, csqcplayer);
+ onslick = trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK;
+ }
+ }
+
float acceleration_progressbar_scale = 0;
if(autocvar_hud_panel_physics_progressbar && autocvar_hud_panel_physics_acceleration_progressbar_scale > 1)
acceleration_progressbar_scale = autocvar_hud_panel_physics_acceleration_progressbar_scale;
else
progressbar_color = autocvar_hud_progressbar_acceleration_color;
- f = acceleration/autocvar_hud_panel_physics_acceleration_max;
+ float acceleration_max = onslick && autocvar_hud_panel_physics_acceleration_max_slick != -1
+ ? autocvar_hud_panel_physics_acceleration_max_slick
+ : autocvar_hud_panel_physics_acceleration_max;
+ f = acceleration / acceleration_max;
if (autocvar_hud_panel_physics_acceleration_progressbar_nonlinear)
f = (f >= 0 ? sqrt(f) : -sqrt(-f));
float autocvar_hud_panel_physics_acceleration_progressbar_scale;
float autocvar_hud_panel_physics_acceleration_progressbar_nonlinear;
float autocvar_hud_panel_physics_acceleration_max;
+float autocvar_hud_panel_physics_acceleration_max_slick = -1;
float autocvar_hud_panel_physics_update_interval;
int autocvar_hud_panel_physics_progressbar;
bool autocvar_hud_panel_physics_acceleration_vertical;