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 (NOTE: ignores vertical speed)"
seta hud_panel_physics_jumpspeed_time "1" "how many seconds the jump speed takes to fade out"
+seta hud_panel_physics_force_layout "0" "1 = force speed and acceleration to be side-by-side, 2 = force them to be above one another"
seta hud_panel_itemstime_progressbar_maxtime "30" "when left time is at least this amount, the status bar is full"
seta hud_panel_itemstime_hidespawned "1" "if 1 hide an item from the panel when all the occurrences of it are available again; if 2 hide it when at least one occurrence is available again"
HUD_Write_Cvar("hud_panel_physics_acceleration_progressbar_nonlinear");
HUD_Write_Cvar("hud_panel_physics_text");
HUD_Write_Cvar("hud_panel_physics_text_scale");
+ HUD_Write_Cvar("hud_panel_physics_force_layout");
}
vector acc_prev_vel;
// compute layout
float panel_ar = panel_size.x / panel_size.y;
vector speed_offset = '0 0 0', acceleration_offset = '0 0 0';
- if (panel_ar >= 5 && !acceleration_progressbar_scale) // speed and accel are drawn side-by-side
+ if (autocvar_hud_panel_physics_force_layout == PHYSICS_LAYOUT_HORIZONTAL
+ || (autocvar_hud_panel_physics_force_layout != PHYSICS_LAYOUT_VERTICAL && panel_ar >= 5 && !acceleration_progressbar_scale))
{
panel_size.x *= 0.5;
if (autocvar_hud_panel_physics_flip)
else
acceleration_offset.x = panel_size.x;
}
- else
+ else // speed and accel are drawn on top of one another (vvv), rather than side by side (^^^)
{
panel_size.y *= 0.5;
if (autocvar_hud_panel_physics_flip)
float autocvar_hud_panel_physics_topspeed_time;
bool autocvar_hud_panel_physics_jumpspeed = false;
float autocvar_hud_panel_physics_jumpspeed_time = 1;
+int autocvar_hud_panel_physics_force_layout = 0;
vector autocvar_hud_progressbar_acceleration_color;
vector autocvar_hud_progressbar_acceleration_neg_color;
const int PHYSICS_TEXT_SPEED = 2;
const int PHYSICS_TEXT_ACCEL = 3;
+const int PHYSICS_LAYOUT_AUTOMATIC = 0;
+const int PHYSICS_LAYOUT_HORIZONTAL = 1;
+const int PHYSICS_LAYOUT_VERTICAL = 2;
+
// 1 m/s^2 = 0.0254 qu/s^2; 1 g = 9.80665 m/s^2
const float ACCEL2GRAV = 0.00259007918096393775; // converts qu/s^2 acceleration to m/s^2, relative to real-world gravity
// equivalent to 0.0254 / 9.80665