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 ()
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 ( )

Definition at line 38 of file physics.qc.

39{
41 {
43 return;
45 return;
46 if (autocvar_hud_panel_physics == 3 && !MUTATOR_CALLHOOK(HUD_Physics_showoptional))
47 return;
48 }
49
51
54 else
58 {
59 panel_pos += '1 1 0' * panel_bg_padding;
60 panel_size -= '2 2 0' * panel_bg_padding;
61 }
62
63 // NOTE: this is copied from strafehud.qc
64 bool is_local = !(spectatee_status > 0 || isdemo());
65 entity strafeplayer = StrafeHUD_GetStrafeplayer(is_local);
66
67 if (!csqcplayer || !strafeplayer)
68 return;
69
70 // draw physics hud
71
73
74 float accel_progressbar_scale = 0;
77
78 float text_scale = (autocvar_hud_panel_physics_text_scale <= 0)
79 ? 1
81
82 // compute speed
83 vector strafevelocity = csqcplayer.velocity;
84 float conversion_factor = GetSpeedUnitFactor(autocvar_hud_speed_unit);
85 float speed, speed2d;
86 float max_speed = floor(autocvar_hud_panel_physics_speed_max * conversion_factor + 0.5);
88 {
89 speed2d = floor(max_speed * 0.65 + 0.5);
90 speed = speed2d; // just ignore vertical speed in hud configure
91 }
92 else
93 {
94 speed2d = floor(vlen(vec2(strafevelocity)) * conversion_factor + 0.5);
96 speed = floor(vlen(strafevelocity) * conversion_factor + 0.5);
97 else
98 speed = speed2d;
99 }
100
101 // compute acceleration
102 float accel;
104 accel = 0.45; // use a hardcoded value so that the hud responds to hud_panel_physics_acceleration_max changing
105 else
106 {
107 float f = time - acc_prev_time;
109 accel = vlen(strafevelocity) - vlen(acc_prev_vel);
110 else
111 accel = vlen(vec2(strafevelocity)) - vlen(vec2(acc_prev_vel));
112
113 accel *= (1 / max(0.0001, f)) * ACCEL2GRAV; // now a fraction of gravity
114
115 acc_prev_vel = strafevelocity;
117
119 {
121 acc_avg = acc_avg * (1 - f) + accel * f;
122 accel = acc_avg;
123 }
124 }
125
126 // compute layout
127 float panel_ar = panel_size.x / panel_size.y;
128 vector speed_offset = '0 0 0', accel_offset = '0 0 0';
130 || (autocvar_hud_panel_physics_force_layout != PHYSICS_LAYOUT_VERTICAL && panel_ar >= 5 && !accel_progressbar_scale))
131 {
132 panel_size.x *= 0.5;
134 speed_offset.x = panel_size.x;
135 else
136 accel_offset.x = panel_size.x;
137 }
138 else // speed and accel are drawn on top of one another (vvv), rather than side by side (^^^)
139 {
140 panel_size.y *= 0.5;
142 speed_offset.y = panel_size.y;
143 else
144 accel_offset.y = panel_size.y;
145 }
146 int speed_baralign, accel_baralign;
148 accel_baralign = speed_baralign = 1;
150 accel_baralign = speed_baralign = 2;
152 {
155 }
156 else
157 {
160 }
162 accel_baralign = 3; // override hud_panel_physics_baralign value for acceleration
163
164 vector tmp_offset = '0 0 0', tmp_size = '0 0 0';
165 float speed_size = 0.75;
166 int text_bits = BITS(0); // describes which texts may be drawn. BIT(0) = topspeed, BIT(1) = jumpspeed, BIT(2) = speed unit
167 // ordered by decreasing priority -- speed unit isn't drawn if the other two are,
168 // ... and topspeed takes priority over jumpspeed in the lower spot
169
170 // draw speed
171 if (speed > 0)
174 {
175 HUD_Panel_DrawProgressBar(panel_pos + speed_offset, panel_size, "progressbar", speed / max_speed, 0, speed_baralign,
177 }
178
179 float accel_max;
182 else
183 {
184 // NOTE: this code is similar to the logic in strafehud.qc
185 bool jumpheld = StrafeHUD_DetermineJumpHeld(strafeplayer, STAT(PRESSED_KEYS), is_local);
186 bool real_onground = StrafeHUD_DetermineOnGround(strafeplayer, is_local);
187 bool onground = real_onground && !jumpheld;
188 bool real_onslick = onground && StrafeHUD_DetermineOnSlick(strafeplayer);
189 bool all_slick = PHYS_FRICTION(strafeplayer) == 0;
190
192 && ((all_slick && real_onground) || real_onslick)
193 && PHYS_SLICKACCELERATE(strafeplayer) >= PHYS_ACCELERATE(strafeplayer))
196 }
197
198 // compute speed text color
199 vector speed_text_color = '1 1 1';
202 {
206 {
207 float accel_pixels_drawn = accel / accel_max * accel_progressbar_scale * panel_size.x;
208 // 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
209 // this workaround prevents tiny floating point errors that would otherwise cause the color to flicker
210 // positive means accel, negative means decel
211 if (accel_pixels_drawn > 1)
213 else if (accel_pixels_drawn < -1)
215 }
216 }
217
218 // compute jumpspeed text
219 float jump_speed_f = 0;
223 {
224 text_bits |= BIT(1);
226 {
227 jump_speed = floor(max_speed * 0.59 + 0.5); // slightly less than current speed text
228 jump_speed_f = 1;
229 }
230 else
231 {
232 if (rint(strafevelocity.z) > rint(prev_vel_z))
233 {
234 // NOTE: this includes some situations where the player doesn't explicitly jump
235 // e.g. landing, swimming in water, walking up/down ramps, using jetpack, bouncepads
238 }
239 prev_vel_z = strafevelocity.z;
241 jump_speed_f = time_frac > 1 ? 0 : cos(time_frac * M_PI_2);
242 }
243 }
244
245 prev_speed2d = speed2d;
246
247 // compute and draw topspeed
248 float top_speed_f = 0;
252 {
253 text_bits |= BIT(0);
255 {
256 top_speed = floor(max_speed * 0.73 + 0.5);
257 top_speed_f = 1;
258 }
259 else
260 {
261 if (speed >= top_speed)
262 {
265 }
266 if (top_speed == 0) // hide topspeed 0
267 top_speed_f = 0;
268 else
269 {
271 top_speed_f = time_frac > 1 ? 0 : cos(time_frac * M_PI_2);
272 }
273 }
274 // topspeed progressbar peak
275 if (top_speed_f > 0)
276 {
277 if (speed < top_speed)
280 {
281 float peak_offsetX;
282 vector peak_size = '0 0 0';
283 if (speed_baralign == 0)
284 peak_offsetX = min(top_speed, max_speed) / max_speed * panel_size.x;
285 else if (speed_baralign == 1)
286 peak_offsetX = (1 - min(top_speed, max_speed) / max_speed) * panel_size.x;
287 else //if (speed_baralign == 2)
288 peak_offsetX = min(top_speed, max_speed) / max_speed * panel_size.x * 0.5;
289 peak_size.x = floor(panel_size.x * 0.01 + 1.5);
290 peak_size.y = panel_size.y;
291 if (speed_baralign == 2) // draw two peaks, on both sides
292 {
293 drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size.x + peak_offsetX - peak_size.x), peak_size,
295 drawfill(panel_pos + speed_offset + eX * (0.5 * panel_size.x - peak_offsetX + peak_size.x), peak_size,
297 }
298 else
299 drawfill(panel_pos + speed_offset + eX * (peak_offsetX - peak_size.x), peak_size,
301 }
302 }
303 else
304 top_speed = 0;
305 }
306
307 const int acc_decimals = 2;
309 {
312 discrete_accel = accel;
313 // workaround for ftos_decimals returning a negative 0
314 if (discrete_accel > -1 / (10 ** acc_decimals) && discrete_accel < 0)
315 discrete_accel = 0;
319 }
320
321 // draw speed text
324 {
325 tmp_size.x = panel_size.x * speed_size;
326 tmp_size.y = panel_size.y * text_scale;
327 tmp_offset.x = speed_baralign ? panel_size.x * (1 - speed_size) : 0;
328 tmp_offset.y = (panel_size.y - tmp_size.y) * 0.5;
329 drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(discrete_speed), tmp_size, speed_text_color, panel_fg_alpha, DRAWFLAG_NORMAL);
330
332 text_bits |= BIT(2);
333 }
334
335 // draw acceleration
336 if (accel)
339 {
340 vector progressbar_color;
341 if (accel < 0)
343 else
345
346 float f = accel / accel_max;
348 f = (f >= 0 ? sqrt(f) : -sqrt(-f));
349
350 if (accel_progressbar_scale) // allow progressbar to go out of panel bounds
351 {
352 tmp_size = accel_progressbar_scale * panel_size.x * eX + panel_size.y * eY;
353
354 if (accel_baralign == 1)
355 tmp_offset.x = panel_size.x - tmp_size.x;
356 else if (accel_baralign == 2 || accel_baralign == 3)
357 tmp_offset.x = (panel_size.x - tmp_size.x) * 0.5;
358 else
359 tmp_offset.x = 0;
360 tmp_offset.y = 0;
361 }
362 else
363 {
364 tmp_size = panel_size;
365 tmp_offset = '0 0 0';
366 }
367
368 HUD_Panel_DrawProgressBar(panel_pos + accel_offset + tmp_offset, tmp_size, "accelbar", f, 0, accel_baralign,
370 }
371
372 // draw acceleration text
375 {
376 tmp_size.x = panel_size.x;
377 tmp_size.y = panel_size.y * text_scale;
378 tmp_offset.x = 0;
379 tmp_offset.y = (panel_size.y - tmp_size.y) * 0.5;
380 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);
381 }
382
383 tmp_size.x = panel_size.x * (1 - speed_size);
384 tmp_offset.x = speed_baralign ? 0 : panel_size.x * speed_size;
385 float top_speed_y = 0, jump_speed_y = 0, main_text_size; // speed unit is not main text
386
387 // draw speed unit text
388 if ((text_bits & BIT(2)) && text_bits != BITS(3)) // can't draw all 3 texts at once, speed unit has the lowest priority
389 {
390 if (text_bits == BIT(2)) // it's the only text drawn, so make it large and centered
391 {
392 main_text_size = 1 - 0.8; // make the main text small, so the non-main text (speed unit) is large
393 tmp_offset.y = panel_size.y * main_text_size * 0.5; // offset halved to center text
394 }
395 else
396 {
397 main_text_size = 0.6; // make the main text slightly larger, since it's more important
398 tmp_offset.y = 0;
399 top_speed_y = panel_size.y * (1 - main_text_size);
400 jump_speed_y = top_speed_y;
401 }
402 tmp_size.y = panel_size.y * (1 - main_text_size) * text_scale;
403 tmp_offset.y += (panel_size.y * (1 - main_text_size) - tmp_size.y) * 0.5;
404 drawstring_aspect(panel_pos + speed_offset + tmp_offset, GetSpeedUnit(autocvar_hud_speed_unit), tmp_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
405 }
406 else if (text_bits == BIT(0) || text_bits == BIT(1)) // only one text is drawn, make it large and centered
407 {
408 main_text_size = 0.8;
409 top_speed_y = panel_size.y * (1 - main_text_size) * 0.5; // offset halved to center text
410 jump_speed_y = top_speed_y;
411 }
412 else // both topspeed and jumpspeed are drawn
413 {
414 main_text_size = 0.5; // make them equal size
415 top_speed_y = panel_size.y * (1 - main_text_size); // put topspeed in the lower slot
416 jump_speed_y = 0; // put jumpspeed in the upper slot
417 }
418
419 // draw jumpspeed text
420 tmp_size.y = panel_size.y * main_text_size * text_scale;
421 if ((text_bits & BIT(1)) && jump_speed_f > 0)
422 {
423 jump_speed_y += (panel_size.y * main_text_size - tmp_size.y) * 0.5;
424 tmp_offset.y = jump_speed_y;
425 drawstring_aspect(panel_pos + speed_offset + tmp_offset, ftos(jump_speed), tmp_size, '0 1 0', jump_speed_f * panel_fg_alpha, DRAWFLAG_NORMAL);
426 }
427 // draw topspeed text
428 if ((text_bits & BIT(0)) && top_speed_f > 0)
429 {
430 top_speed_y += (panel_size.y * main_text_size - tmp_size.y) * 0.5;
431 tmp_offset.y = top_speed_y;
432 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);
433 }
434
436}
#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:110
#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:1122
float GetSpeedUnitFactor(int speed_unit)
Definition main.qc:1109
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().