Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
physics.qc File Reference
#include "physics.qh"
#include <client/draw.qh>
#include <lib/csqcmodel/cl_player.qh>
#include <common/physics/player.qh>
#include "strafehud.qh"
Include dependency graph for physics.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HUD_Physics (bool should_draw)
void HUD_Physics_Export (int fh)

Variables

float acc_avg
float acc_prev_time
vector acc_prev_vel
float discrete_accel
float discrete_speed
float discrete_top_speed
float jump_speed
float jump_speed_time
float physics_update_time
float prev_speed2d = 0
float prev_vel_z = 0
float top_speed
float top_speed_time

Function Documentation

◆ HUD_Physics()

void HUD_Physics ( bool should_draw)

Definition at line 38 of file physics.qc.

39{
40 if (!should_draw)
41 return;
43 {
45 return;
47 return;
48 if (autocvar_hud_panel_physics == 3 && !MUTATOR_CALLHOOK(HUD_Physics_showoptional))
49 return;
50 }
51
53
56 else
60 {
61 panel_pos += '1 1 0' * panel_bg_padding;
62 panel_size -= '2 2 0' * panel_bg_padding;
63 }
64
65 // NOTE: this is copied from strafehud.qc
66 bool is_local = !(spectatee_status > 0 || isdemo());
67 entity strafeplayer = StrafeHUD_GetStrafeplayer(is_local);
68
69 if (!csqcplayer || !strafeplayer)
70 return;
71
72 // draw physics hud
73
75
76 float accel_progressbar_scale = 0;
79
80 float text_scale = (autocvar_hud_panel_physics_text_scale <= 0)
81 ? 1
83
84 // compute speed
85 vector strafevelocity = csqcplayer.velocity;
86 float conversion_factor = GetSpeedUnitFactor(autocvar_hud_speed_unit);
87 float speed, speed2d;
88 float max_speed = floor(autocvar_hud_panel_physics_speed_max * conversion_factor + 0.5);
90 {
91 speed2d = floor(max_speed * 0.65 + 0.5);
92 speed = speed2d; // just ignore vertical speed in hud configure
93 }
94 else
95 {
96 speed2d = floor(vlen(vec2(strafevelocity)) * conversion_factor + 0.5);
98 speed = floor(vlen(strafevelocity) * conversion_factor + 0.5);
99 else
100 speed = speed2d;
101 }
102
103 // compute acceleration
104 float accel;
106 accel = 0.45; // use a hardcoded value so that the hud responds to hud_panel_physics_acceleration_max changing
107 else
108 {
109 float f = time - acc_prev_time;
111 accel = vlen(strafevelocity) - vlen(acc_prev_vel);
112 else
113 accel = vlen(vec2(strafevelocity)) - vlen(vec2(acc_prev_vel));
114
115 accel *= (1 / max(0.0001, f)) * ACCEL2GRAV; // now a fraction of gravity
116
117 acc_prev_vel = strafevelocity;
119
121 {
123 acc_avg = acc_avg * (1 - f) + accel * f;
124 accel = acc_avg;
125 }
126 }
127
128 // compute layout
129 float panel_ar = panel_size.x / panel_size.y;
130 vector speed_offset = '0 0 0', accel_offset = '0 0 0';
132 || (autocvar_hud_panel_physics_force_layout != PHYSICS_LAYOUT_VERTICAL && panel_ar >= 5 && !accel_progressbar_scale))
133 {
134 panel_size.x *= 0.5;
136 speed_offset.x = panel_size.x;
137 else
138 accel_offset.x = panel_size.x;
139 }
140 else // speed and accel are drawn on top of one another (vvv), rather than side by side (^^^)
141 {
142 panel_size.y *= 0.5;
144 speed_offset.y = panel_size.y;
145 else
146 accel_offset.y = panel_size.y;
147 }
148 int speed_baralign, accel_baralign;
150 accel_baralign = speed_baralign = 1;
152 accel_baralign = speed_baralign = 2;
154 {
157 }
158 else
159 {
162 }
164 accel_baralign = 3; // override hud_panel_physics_baralign value for acceleration
165
166 vector tmp_offset = '0 0 0', tmp_size = '0 0 0';
167 float speed_size = 0.75;
168 int text_bits = BITS(0); // describes which texts may be drawn. BIT(0) = topspeed, BIT(1) = jumpspeed, BIT(2) = speed unit
169 // ordered by decreasing priority -- speed unit isn't drawn if the other two are,
170 // ... and topspeed takes priority over jumpspeed in the lower spot
171
172 // draw speed
173 if (speed > 0)
176 {
177 HUD_Panel_DrawProgressBar(panel_pos + speed_offset, panel_size, "progressbar", speed / max_speed, 0, speed_baralign,
179 }
180
181 float accel_max;
184 else
185 {
186 // NOTE: this code is similar to the logic in strafehud.qc
187 bool jumpheld = StrafeHUD_DetermineJumpHeld(strafeplayer, STAT(PRESSED_KEYS), is_local);
188 bool real_onground = StrafeHUD_DetermineOnGround(strafeplayer, is_local);
189 bool onground = real_onground && !jumpheld;
190 bool real_onslick = onground && StrafeHUD_DetermineOnSlick(strafeplayer);
191 bool all_slick = PHYS_FRICTION(strafeplayer) == 0;
192
194 && ((all_slick && real_onground) || real_onslick)
195 && PHYS_SLICKACCELERATE(strafeplayer) >= PHYS_ACCELERATE(strafeplayer))
198 }
199
200 // compute speed text color
201 vector speed_text_color = '1 1 1';
204 {
208 {
209 float accel_pixels_drawn = accel / accel_max * accel_progressbar_scale * panel_size.x;
210 // this calculates how wide the accel/decel bar would be (if it were drawn), so that the text is only colored if something shows on the bar
211 // this workaround prevents tiny floating point errors that would otherwise cause the color to flicker
212 // positive means accel, negative means decel
213 if (accel_pixels_drawn > 1)
215 else if (accel_pixels_drawn < -1)
217 }
218 }
219
220 // compute jumpspeed text
221 float jump_speed_f = 0;
225 {
226 text_bits |= BIT(1);
228 {
229 jump_speed = floor(max_speed * 0.59 + 0.5); // slightly less than current speed text
230 jump_speed_f = 1;
231 }
232 else
233 {
234 if (rint(strafevelocity.z) > rint(prev_vel_z))
235 {
236 // NOTE: this includes some situations where the player doesn't explicitly jump
237 // e.g. landing, swimming in water, walking up/down ramps, using jetpack, bouncepads
240 }
241 prev_vel_z = strafevelocity.z;
243 jump_speed_f = time_frac > 1 ? 0 : cos(time_frac * M_PI_2);
244 }
245 }
246
247 prev_speed2d = speed2d;
248
249 // compute and draw topspeed
250 float top_speed_f = 0;
254 {
255 text_bits |= BIT(0);
257 {
258 top_speed = floor(max_speed * 0.73 + 0.5);
259 top_speed_f = 1;
260 }
261 else
262 {
263 if (speed >= top_speed)
264 {
267 }
268 if (top_speed == 0) // hide topspeed 0
269 top_speed_f = 0;
270 else
271 {
273 top_speed_f = time_frac > 1 ? 0 : cos(time_frac * M_PI_2);
274 }
275 }
276 // topspeed progressbar peak
277 if (top_speed_f > 0)
278 {
279 if (speed < top_speed)
282 {
283 float peak_offsetX;
284 vector peak_size = '0 0 0';
285 if (speed_baralign == 0)
286 peak_offsetX = min(top_speed, max_speed) / max_speed * panel_size.x;
287 else if (speed_baralign == 1)
288 peak_offsetX = (1 - min(top_speed, max_speed) / max_speed) * panel_size.x;
289 else //if (speed_baralign == 2)
290 peak_offsetX = min(top_speed, max_speed) / max_speed * panel_size.x * 0.5;
291 peak_size.x = floor(panel_size.x * 0.01 + 1.5);
292 peak_size.y = panel_size.y;
293 if (speed_baralign == 2) // draw two peaks, on both sides
294 {
295 drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size.x + peak_offsetX - peak_size.x), peak_size,
297 drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size.x - peak_offsetX + peak_size.x), peak_size,
299 }
300 else
301 drawfill(panel_pos + speed_offset + eX * (peak_offsetX - peak_size.x), peak_size,
303 }
304 }
305 else
306 top_speed = 0;
307 }
308
309 const int acc_decimals = 2;
311 {
314 discrete_accel = accel;
315 // workaround for ftos_decimals returning a negative 0
316 if (discrete_accel > -1 / (10 ** acc_decimals) && discrete_accel < 0)
317 discrete_accel = 0;
321 }
322
323 // draw speed text
326 {
327 tmp_size.x = panel_size.x * speed_size;
328 tmp_size.y = panel_size.y * text_scale;
329 tmp_offset.x = speed_baralign ? panel_size.x * (1 - speed_size) : 0;
330 tmp_offset.y = (panel_size.y - tmp_size.y) * 0.5;
331 drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(discrete_speed), tmp_size, speed_text_color, panel_fg_alpha, DRAWFLAG_NORMAL);
332
334 text_bits |= BIT(2);
335 }
336
337 // draw acceleration
338 if (accel)
341 {
342 vector progressbar_color;
343 if (accel < 0)
345 else
347
348 float f = accel / accel_max;
350 f = (f >= 0 ? sqrt(f) : -sqrt(-f));
351
352 if (accel_progressbar_scale) // allow progressbar to go out of panel bounds
353 {
354 tmp_size = accel_progressbar_scale * panel_size.x * eX + panel_size.y * eY;
355
356 if (accel_baralign == 1)
357 tmp_offset.x = panel_size.x - tmp_size.x;
358 else if (accel_baralign == 2 || accel_baralign == 3)
359 tmp_offset.x = (panel_size.x - tmp_size.x) * 0.5;
360 else
361 tmp_offset.x = 0;
362 tmp_offset.y = 0;
363 }
364 else
365 {
366 tmp_size = panel_size;
367 tmp_offset = '0 0 0';
368 }
369
370 HUD_Panel_DrawProgressBar(panel_pos + accel_offset + tmp_offset, tmp_size, "accelbar", f, 0, accel_baralign,
372 }
373
374 // draw acceleration text
377 {
378 tmp_size.x = panel_size.x;
379 tmp_size.y = panel_size.y * text_scale;
380 tmp_offset.x = 0;
381 tmp_offset.y = (panel_size.y - tmp_size.y) * 0.5;
382 drawstring_aspect(panel_pos + accel_offset + tmp_offset, strcat(ftos_decimals(discrete_accel, acc_decimals), "g"), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
383 }
384
385 tmp_size.x = panel_size.x * (1 - speed_size);
386 tmp_offset.x = speed_baralign ? 0 : panel_size.x * speed_size;
387 float top_speed_y = 0, jump_speed_y = 0, main_text_size; // speed unit is not main text
388
389 // draw speed unit text
390 if ((text_bits & BIT(2)) && text_bits != BITS(3)) // can't draw all 3 texts at once, speed unit has the lowest priority
391 {
392 if (text_bits == BIT(2)) // it's the only text drawn, so make it large and centered
393 {
394 main_text_size = 1 - 0.8; // make the main text small, so the non-main text (speed unit) is large
395 tmp_offset.y = panel_size.y * main_text_size * 0.5; // offset halved to center text
396 }
397 else
398 {
399 main_text_size = 0.6; // make the main text slightly larger, since it's more important
400 tmp_offset.y = 0;
401 top_speed_y = panel_size.y * (1 - main_text_size);
402 jump_speed_y = top_speed_y;
403 }
404 tmp_size.y = panel_size.y * (1 - main_text_size) * text_scale;
405 tmp_offset.y += (panel_size.y * (1 - main_text_size) - tmp_size.y) * 0.5;
406 drawstring_aspect(panel_pos + speed_offset + tmp_offset, GetSpeedUnit(autocvar_hud_speed_unit), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
407 }
408 else if (text_bits == BIT(0) || text_bits == BIT(1)) // only one text is drawn, make it large and centered
409 {
410 main_text_size = 0.8;
411 top_speed_y = panel_size.y * (1 - main_text_size) * 0.5; // offset halved to center text
412 jump_speed_y = top_speed_y;
413 }
414 else // both topspeed and jumpspeed are drawn
415 {
416 main_text_size = 0.5; // make them equal size
417 top_speed_y = panel_size.y * (1 - main_text_size); // put topspeed in the lower slot
418 jump_speed_y = 0; // put jumpspeed in the upper slot
419 }
420
421 // draw jumpspeed text
422 tmp_size.y = panel_size.y * main_text_size * text_scale;
423 if ((text_bits & BIT(1)) && jump_speed_f > 0)
424 {
425 jump_speed_y += (panel_size.y * main_text_size - tmp_size.y) * 0.5;
426 tmp_offset.y = jump_speed_y;
427 drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(jump_speed), tmp_size, '0 1 0', jump_speed_f * panel_fg_alpha, DRAWFLAG_NORMAL);
428 }
429 // draw topspeed text
430 if ((text_bits & BIT(0)) && top_speed_f > 0)
431 {
432 top_speed_y += (panel_size.y * main_text_size - tmp_size.y) * 0.5;
433 tmp_offset.y = top_speed_y;
434 drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(discrete_top_speed), tmp_size, '1 0 0', top_speed_f * panel_fg_alpha, DRAWFLAG_NORMAL);
435 }
436
438}
#define MUTATOR_CALLHOOK(id,...)
Definition base.qh:143
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
#define BITS(n)
Definition bits.qh:9
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity csqcplayer
Definition cl_player.qh:26
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
Definition draw.qc:109
#define draw_beginBoldFont()
Definition draw.qh:4
#define drawfill(position, size, rgb, alpha, flag)
Definition draw.qh:36
#define draw_endBoldFont()
Definition draw.qh:5
float top_speed
Definition physics.qc:35
float jump_speed_time
Definition physics.qc:35
float prev_speed2d
Definition physics.qc:36
float discrete_speed
Definition physics.qc:37
float discrete_accel
Definition physics.qc:37
float prev_vel_z
Definition physics.qc:36
float discrete_top_speed
Definition physics.qc:37
float jump_speed
Definition physics.qc:35
vector acc_prev_vel
Definition physics.qc:34
float top_speed_time
Definition physics.qc:35
float acc_prev_time
Definition physics.qc:35
float physics_update_time
Definition physics.qc:37
float acc_avg
Definition physics.qc:35
bool autocvar_hud_panel_physics_acceleration_vertical
Definition physics.qh:13
int autocvar_hud_panel_physics_acceleration_progressbar_mode
Definition physics.qh:6
bool autocvar_hud_panel_physics
Definition physics.qh:4
const int PHYSICS_BARALIGN_CENTER
Definition physics.qh:37
float autocvar_hud_panel_physics_acceleration_max
Definition physics.qh:9
const float ACCEL2GRAV
Definition physics.qh:54
bool autocvar_hud_panel_physics_speed_colored
Definition physics.qh:20
bool autocvar_hud_panel_physics_acceleration_progressbar_nonlinear
Definition physics.qh:8
float autocvar_hud_panel_physics_update_interval
Definition physics.qh:11
const int PHYSICS_TEXT_SPEED
Definition physics.qh:46
float autocvar_hud_panel_physics_text_scale
Definition physics.qh:22
int autocvar_hud_panel_physics_force_layout
Definition physics.qh:27
float autocvar_hud_panel_physics_speed_max
Definition physics.qh:17
const int PHYSICS_LAYOUT_HORIZONTAL
Definition physics.qh:50
const int PHYSICS_TEXT_BOTH
Definition physics.qh:45
float autocvar_hud_panel_physics_acceleration_max_slick
Definition physics.qh:10
bool autocvar_hud_panel_physics_dynamichud
Definition physics.qh:16
int autocvar_hud_panel_physics_progressbar
Definition physics.qh:12
const int PHYSICS_BARALIGN_RIGHT
Definition physics.qh:34
vector autocvar_hud_progressbar_acceleration_neg_color
Definition physics.qh:30
const int PHYSICS_PROGRESSBAR_SPEED
Definition physics.qh:41
float autocvar_hud_panel_physics_acceleration_movingaverage
Definition physics.qh:5
const int PHYSICS_LAYOUT_VERTICAL
Definition physics.qh:51
int autocvar_hud_panel_physics_text
Definition physics.qh:21
bool autocvar_hud_panel_physics_speed_vertical
Definition physics.qh:19
bool autocvar_hud_panel_physics_jumpspeed
Definition physics.qh:25
vector autocvar_hud_progressbar_speed_color
Definition physics.qh:31
const int PHYSICS_BARALIGN_ONLY_LEFT
Definition physics.qh:35
const int PHYSICS_BARALIGN_ONLY_RIGHT
Definition physics.qh:36
const int PHYSICS_TEXT_ACCEL
Definition physics.qh:47
const int PHYSICS_PROGRESSBAR_ACCEL
Definition physics.qh:42
float autocvar_hud_panel_physics_topspeed_time
Definition physics.qh:24
bool autocvar_hud_panel_physics_topspeed
Definition physics.qh:23
float autocvar_hud_panel_physics_acceleration_progressbar_scale
Definition physics.qh:7
const int PHYSICS_PROGRESSBAR_BOTH
Definition physics.qh:40
vector autocvar_hud_progressbar_acceleration_color
Definition physics.qh:29
bool autocvar_hud_panel_physics_flip
Definition physics.qh:15
bool autocvar_hud_panel_physics_speed_unit_show
Definition physics.qh:18
int autocvar_hud_panel_physics_baralign
Definition physics.qh:14
float autocvar_hud_panel_physics_jumpspeed_time
Definition physics.qh:26
entity StrafeHUD_GetStrafeplayer(bool is_local)
Definition util.qc:109
bool StrafeHUD_DetermineOnSlick(entity e)
Definition util.qc:341
bool StrafeHUD_DetermineJumpHeld(entity e, int keys, bool is_local)
Definition util.qc:316
bool StrafeHUD_DetermineOnGround(entity e, bool is_local)
Definition util.qc:334
string GetSpeedUnit(int speed_unit)
Definition main.qc:1115
float GetSpeedUnitFactor(int speed_unit)
Definition main.qc:1102
int spectatee_status
the -1 disables HUD panels before CSQC receives necessary data
Definition main.qh:197
#define PHYS_FRICTION(s)
Definition player.qh:114
#define PHYS_SLICKACCELERATE(s)
Definition player.qh:96
#define PHYS_ACCELERATE(s)
Definition player.qh:94
const float DRAWFLAG_NORMAL
float time
float speed
Definition dynlight.qc:9
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
Definition hud.qc:269
void HUD_Panel_LoadCvars()
Definition hud.qc:215
void HUD_Scale_Enable()
Definition hud.qc:91
void HUD_Scale_Disable()
Definition hud.qc:84
float autocvar_hud_progressbar_alpha
Definition hud.qh:204
vector panel_size
Definition hud.qh:163
float panel_fg_alpha
Definition hud.qh:169
float panel_bg_padding
Definition hud.qh:174
int autocvar_hud_speed_unit
Definition hud.qh:207
#define HUD_Panel_DrawBg()
Definition hud.qh:55
vector panel_pos
Definition hud.qh:162
bool autocvar__hud_configure
Definition hud_config.qh:3
#define STAT(...)
Definition stats.qh:82
const float M_PI_2
Definition mathlib.qh:109
float isdemo()
float bound(float min, float value, float max)
float cos(float f)
float vlen(vector v)
float sqrt(float f)
float min(float f,...)
float rint(float f)
string ftos(float f)
float floor(float f)
float max(float f,...)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
vector
Definition self.qh:92
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
Definition string.qh:469
const vector eY
Definition vector.qh:45
const vector eX
Definition vector.qh:44
#define vec2(...)
Definition vector.qh:90

References acc_avg, acc_prev_time, acc_prev_vel, ACCEL2GRAV, autocvar__hud_configure, autocvar_hud_panel_physics, autocvar_hud_panel_physics_acceleration_max, autocvar_hud_panel_physics_acceleration_max_slick, autocvar_hud_panel_physics_acceleration_movingaverage, autocvar_hud_panel_physics_acceleration_progressbar_mode, autocvar_hud_panel_physics_acceleration_progressbar_nonlinear, autocvar_hud_panel_physics_acceleration_progressbar_scale, autocvar_hud_panel_physics_acceleration_vertical, autocvar_hud_panel_physics_baralign, autocvar_hud_panel_physics_dynamichud, autocvar_hud_panel_physics_flip, autocvar_hud_panel_physics_force_layout, autocvar_hud_panel_physics_jumpspeed, autocvar_hud_panel_physics_jumpspeed_time, autocvar_hud_panel_physics_progressbar, autocvar_hud_panel_physics_speed_colored, autocvar_hud_panel_physics_speed_max, autocvar_hud_panel_physics_speed_unit_show, autocvar_hud_panel_physics_speed_vertical, autocvar_hud_panel_physics_text, autocvar_hud_panel_physics_text_scale, autocvar_hud_panel_physics_topspeed, autocvar_hud_panel_physics_topspeed_time, autocvar_hud_panel_physics_update_interval, autocvar_hud_progressbar_acceleration_color, autocvar_hud_progressbar_acceleration_neg_color, autocvar_hud_progressbar_alpha, autocvar_hud_progressbar_speed_color, autocvar_hud_speed_unit, BIT, BITS, bound(), cos(), csqcplayer, discrete_accel, discrete_speed, discrete_top_speed, draw_beginBoldFont, draw_endBoldFont, drawfill, DRAWFLAG_NORMAL, drawstring_aspect(), entity(), eX, eY, floor(), ftos(), ftos_decimals(), GetSpeedUnit(), GetSpeedUnitFactor(), HUD_Panel_DrawBg, HUD_Panel_DrawProgressBar(), HUD_Panel_LoadCvars(), HUD_Scale_Disable(), HUD_Scale_Enable(), isdemo(), jump_speed, jump_speed_time, M_PI_2, max(), min(), MUTATOR_CALLHOOK, panel_bg_padding, panel_fg_alpha, panel_pos, panel_size, PHYS_ACCELERATE, PHYS_FRICTION, PHYS_SLICKACCELERATE, PHYSICS_BARALIGN_CENTER, PHYSICS_BARALIGN_ONLY_LEFT, PHYSICS_BARALIGN_ONLY_RIGHT, PHYSICS_BARALIGN_RIGHT, PHYSICS_LAYOUT_HORIZONTAL, PHYSICS_LAYOUT_VERTICAL, PHYSICS_PROGRESSBAR_ACCEL, PHYSICS_PROGRESSBAR_BOTH, PHYSICS_PROGRESSBAR_SPEED, PHYSICS_TEXT_ACCEL, PHYSICS_TEXT_BOTH, PHYSICS_TEXT_SPEED, physics_update_time, prev_speed2d, prev_vel_z, rint(), spectatee_status, speed, sqrt(), STAT, StrafeHUD_DetermineJumpHeld(), StrafeHUD_DetermineOnGround(), StrafeHUD_DetermineOnSlick(), StrafeHUD_GetStrafeplayer(), strcat(), time, top_speed, top_speed_time, vec2, vector, and vlen().

◆ HUD_Physics_Export()

void HUD_Physics_Export ( int fh)

Definition at line 10 of file physics.qc.

11{
12 // allow saving cvars that aesthetically change the panel into hud skin files
13 HUD_Write_Cvar("hud_panel_physics_speed_unit_show");
14 HUD_Write_Cvar("hud_panel_physics_speed_max");
15 HUD_Write_Cvar("hud_panel_physics_speed_vertical");
16 HUD_Write_Cvar("hud_panel_physics_topspeed");
17 HUD_Write_Cvar("hud_panel_physics_topspeed_time");
18 HUD_Write_Cvar("hud_panel_physics_jumpspeed");
19 HUD_Write_Cvar("hud_panel_physics_jumpspeed_time");
20 HUD_Write_Cvar("hud_panel_physics_acceleration_max");
21 HUD_Write_Cvar("hud_panel_physics_acceleration_max_slick");
22 HUD_Write_Cvar("hud_panel_physics_acceleration_vertical");
23 HUD_Write_Cvar("hud_panel_physics_flip");
24 HUD_Write_Cvar("hud_panel_physics_baralign");
25 HUD_Write_Cvar("hud_panel_physics_progressbar");
26 HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_mode");
27 HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_scale");
28 HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_nonlinear");
29 HUD_Write_Cvar("hud_panel_physics_text");
30 HUD_Write_Cvar("hud_panel_physics_text_scale");
31 HUD_Write_Cvar("hud_panel_physics_force_layout");
32}
#define HUD_Write_Cvar(cvar)
Definition hud_config.qh:40

References HUD_Write_Cvar.

Variable Documentation

◆ acc_avg

float acc_avg

Definition at line 35 of file physics.qc.

Referenced by HUD_Physics().

◆ acc_prev_time

float acc_prev_time

Definition at line 35 of file physics.qc.

Referenced by HUD_Physics().

◆ acc_prev_vel

vector acc_prev_vel

Definition at line 34 of file physics.qc.

Referenced by HUD_Physics().

◆ discrete_accel

float discrete_accel

Definition at line 37 of file physics.qc.

Referenced by HUD_Physics().

◆ discrete_speed

float discrete_speed

Definition at line 37 of file physics.qc.

Referenced by HUD_Physics().

◆ discrete_top_speed

float discrete_top_speed

Definition at line 37 of file physics.qc.

Referenced by HUD_Physics().

◆ jump_speed

float jump_speed

Definition at line 35 of file physics.qc.

Referenced by HUD_Physics().

◆ jump_speed_time

float jump_speed_time

Definition at line 35 of file physics.qc.

Referenced by HUD_Physics().

◆ physics_update_time

float physics_update_time

Definition at line 37 of file physics.qc.

Referenced by HUD_Physics().

◆ prev_speed2d

float prev_speed2d = 0

Definition at line 36 of file physics.qc.

Referenced by HUD_Physics().

◆ prev_vel_z

float prev_vel_z = 0

Definition at line 36 of file physics.qc.

Referenced by HUD_Physics().

◆ top_speed

float top_speed

Definition at line 35 of file physics.qc.

Referenced by HUD_Physics().

◆ top_speed_time

float top_speed_time

Definition at line 35 of file physics.qc.

Referenced by HUD_Physics().