Skip to content

Commit

Permalink
cgame: Correct mouse yaw direction when player is flying and looking …
Browse files Browse the repository at this point in the history
…vertically
  • Loading branch information
LegendaryGuard committed Feb 4, 2024
1 parent 93b69d9 commit b2fb6b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/cgame/cg_snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ static void CG_TransitionSnapshot( void ) {
}
}

// BFP - When the player is flying and looking vertically,
// adjust the mouse's yaw direction to prevent the player from
// looking in the incorrect horizontal direction
if ( cg.refdefViewAngles[PITCH] <= -100 || cg.refdefViewAngles[PITCH] >= 100 ) {
trap_SendConsoleCommand( "seta m_yaw -0.022" );
} else {
trap_SendConsoleCommand( "seta m_yaw 0.022" );
}
}


Expand Down

0 comments on commit b2fb6b3

Please sign in to comment.