seta hud_panel_strafehud_mode "0" "strafehud mode which controls whether the strafehud is centered at: \"0\" = view angle, \"1\" = velocity direction"
seta hud_panel_strafehud_bar_alpha "0.3" "opacity of the strafe meter"
seta hud_panel_strafehud_bar_color "1 1 1" "color of the strafe meter"
+seta hud_panel_strafehud_indicators "1" "show the strafe indicators"
seta hud_panel_strafehud_indicator_color "0 1 0" "color of the strafe angle indicator"
seta hud_panel_strafehud_indicator_switch_color "1 1 0" "color of the strafe angle indicator on the opposite side"
seta hud_panel_strafehud_angle "0" "the maximum angle displayed on the strafehud, \"0\" = dynamic"
float bestangle_offset;
float bestangle_width;
float switch_bestangle_offset;
- float switch_bestangle_width;
float accelzone_offset;
float accelzone_width;
float odd_accelzone_offset;
// best strafe acceleration angle
bestangle_offset = bestangle/hudangle * panel_size.x + panel_size.x/2;
switch_bestangle_offset = -bestangle/hudangle * panel_size.x + panel_size.x/2;
- bestangle_width = panel_size.x * .01;
- if(bestangle_width < 1) bestangle_width = 1;
- switch_bestangle_width = bestangle_width;
+ if(autocvar_hud_panel_strafehud_indicators)
+ {
+ bestangle_width = panel_size.x * .01;
+ if(bestangle_width < 1) bestangle_width = 1;
+ }
+ else
+ {
+ bestangle_width = 0;
+ }
// remove indicator width from offset
if(direction < 0)
{
}
else
{
- switch_bestangle_offset -= switch_bestangle_width;
+ switch_bestangle_offset -= bestangle_width;
}
// direction indicator
direction_size_vertical.x = panel_size.x * .0075;
// bottom horizontal line
drawfill(panel_pos + eX * (direction < 0 ? -direction_size_vertical.x : panel_size.x - direction_size_horizontal.x + direction_size_vertical.x) + eY * panel_size.y, direction_size_horizontal, autocvar_hud_panel_strafehud_direction_color, panel_fg_alpha, DRAWFLAG_NORMAL);
- // draw best angles for acceleration
- HUD_Panel_DrawStrafeHUD_drawfill(switch_bestangle_offset, switch_bestangle_width, autocvar_hud_panel_strafehud_indicator_switch_color, 1, hidden_size);
- HUD_Panel_DrawStrafeHUD_drawfill(bestangle_offset, bestangle_width, autocvar_hud_panel_strafehud_indicator_color, 1, hidden_size);
+ if(autocvar_hud_panel_strafehud_indicators)
+ {
+ // draw best angles for acceleration
+ HUD_Panel_DrawStrafeHUD_drawfill(switch_bestangle_offset, bestangle_width, autocvar_hud_panel_strafehud_indicator_switch_color, 1, hidden_size);
+ HUD_Panel_DrawStrafeHUD_drawfill(bestangle_offset, bestangle_width, autocvar_hud_panel_strafehud_indicator_color, 1, hidden_size);
+ }
}
else
{
- // draw best angles for acceleration
- HUD_Panel_DrawStrafeHUD_drawfill(switch_bestangle_offset, switch_bestangle_width, autocvar_hud_panel_strafehud_indicator_switch_color, 1, hidden_size);
- HUD_Panel_DrawStrafeHUD_drawfill(bestangle_offset, bestangle_width, autocvar_hud_panel_strafehud_indicator_switch_color, 1, hidden_size);
+ if(autocvar_hud_panel_strafehud_indicators)
+ {
+ // draw best angles for acceleration
+ HUD_Panel_DrawStrafeHUD_drawfill(switch_bestangle_offset, bestangle_width, autocvar_hud_panel_strafehud_indicator_switch_color, 1, hidden_size);
+ HUD_Panel_DrawStrafeHUD_drawfill(bestangle_offset, bestangle_width, autocvar_hud_panel_strafehud_indicator_switch_color, 1, hidden_size);
+ }
}
}
else