22 HUD_Write_Cvar(
"hud_panel_physics_acceleration_progressbar_scale");
23 HUD_Write_Cvar(
"hud_panel_physics_acceleration_progressbar_nonlinear");
55 float acceleration_progressbar_scale = 0;
71 speed =
floor( max_speed * 0.65 + 0.5 );
73 speed =
floor(
vlen(vel) * conversion_factor + 0.5 );
75 speed =
floor(
vlen(vel - vel.z *
'0 0 1') * conversion_factor + 0.5 );
78 float acceleration, f;
90 acceleration = acceleration * (1 /
max(0.0001, f)) * (0.0254 / 9.80665);
97 f =
bound(0, f * 10, 1);
103 const int acc_decimals = 2;
118 vector speed_offset =
'0 0 0', acceleration_offset =
'0 0 0';
119 if (panel_ar >= 5 && !acceleration_progressbar_scale)
135 int speed_baralign, acceleration_baralign;
137 acceleration_baralign = speed_baralign = 1;
139 acceleration_baralign = speed_baralign = 2;
151 acceleration_baralign = 3;
157 vector tmp_offset =
'0 0 0', tmp_size =
'0 0 0';
166 tmp_offset.y = (
panel_size.y - tmp_size.y) / 2;
173 tmp_offset.x = tmp_size.x;
179 tmp_offset.y = (
panel_size.y * 0.4 - tmp_size.y) / 2;
217 vector peak_size =
'0 0 0';
218 if (speed_baralign == 0)
220 else if (speed_baralign == 1)
226 if (speed_baralign == 2)
238 tmp_size.y = (
panel_size.y - tmp_offset.y) * text_scale;
239 tmp_offset.y += (
panel_size.y - tmp_offset.y - tmp_size.y) / 2;
260 if (acceleration_progressbar_scale)
264 if (acceleration_baralign == 1)
266 else if (acceleration_baralign == 2 || acceleration_baralign == 3)
267 tmp_offset.x = (
panel_size.x - tmp_size.x) / 2;
275 tmp_offset =
'0 0 0';
286 tmp_offset.y = (
panel_size.y - tmp_size.y) / 2;
bool autocvar_hud_panel_physics_flip
#define draw_endBoldFont()
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
vector autocvar_hud_progressbar_speed_color
bool autocvar_hud_panel_physics_acceleration_vertical
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
float autocvar_hud_panel_physics_acceleration_max
float autocvar_hud_panel_physics_acceleration_progressbar_nonlinear
bool autocvar__hud_configure
#define draw_beginBoldFont()
vector autocvar_hud_progressbar_acceleration_color
int autocvar_hud_panel_physics_baralign
bool autocvar_hud_panel_physics_topspeed
bool autocvar_hud_panel_physics_speed_vertical
#define HUD_Panel_DrawBg()
float physics_update_time
float GetSpeedUnitFactor(int speed_unit)
float autocvar_hud_panel_physics_topspeed_time
void HUD_Physics_Export(int fh)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
vector autocvar_hud_progressbar_acceleration_neg_color
bool autocvar_hud_panel_physics_dynamichud
const float DRAWFLAG_NORMAL
float autocvar_hud_panel_physics_speed_max
int autocvar_hud_panel_physics_speed_unit
vector(float skel, float bonenum) _skel_get_boneabs_hidden
bool autocvar_hud_panel_physics_speed_unit_show
float discrete_acceleration
bool autocvar_hud_panel_physics
string GetSpeedUnit(int speed_unit)
#define MUTATOR_CALLHOOK(id,...)
float autocvar_hud_panel_physics_update_interval
float autocvar_hud_panel_physics_acceleration_movingaverage
int autocvar_hud_panel_physics_text
float autocvar_hud_panel_physics_text_scale
float autocvar_hud_progressbar_alpha
#define HUD_Write_Cvar(cvar)
float autocvar_hud_panel_physics_acceleration_progressbar_scale
float autocvar_hud_panel_physics_acceleration_progressbar_mode
int autocvar_hud_panel_physics_progressbar
void HUD_Panel_LoadCvars()