}
state_fwd_prev = state_fwd;
- if((time - state_fwd_time) >= autocvar_hud_panel_strafehud_timeout_direction || speed < maxspeed) // timeout when changing between forwards and backwards movement
+ if((time - state_fwd_time) >= autocvar_hud_panel_strafehud_timeout_direction || speed < maxspeed || strafekeys) // timeout when changing between forwards and backwards movement
{
fwd = state_fwd;
}
if(direction != 0)
{
bool indicator_direction = direction < 0;
- // invert left/right if strafing backwards
- if(fwd == false)
+ // invert left/right when strafing backwards or when strafing towards the opposite side indicated by the direction variable
+ // if both conditions are true then it's inverted twice hence not inverted at all
+ if(!fwd != odd_angles)
{
indicator_direction = !indicator_direction;
}