Skip to content

Commit

Permalink
Fix zoom_in/out binds being inverted & fix ability to control zoom by…
Browse files Browse the repository at this point in the history
… weapon_next/previous binds
  • Loading branch information
darkdrifter committed Oct 21, 2022
1 parent 27e340c commit 4a4bcbc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Client/core/CKeyBinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1925,9 +1925,17 @@ void CKeyBinds::DoPostFramePulse()
{
if (!bInVehicle)
{
cs.ButtonCircle = (g_bcControls[0].bState && !bHasDetonator) ? 255 : 0; // Fire
cs.RightShoulder2 = (g_bcControls[1].bState || (bAimingWeapon && g_bcControls[7].bState)) ? 255 : 0; // Next Weapon / Zoom In
cs.LeftShoulder2 = (g_bcControls[2].bState || (bAimingWeapon && g_bcControls[8].bState)) ? 255 : 0; // Previous Weapon / Zoom Out
cs.ButtonCircle = (g_bcControls[0].bState && !bHasDetonator) ? 255 : 0; // Fire
if (bAimingWeapon)
{
cs.RightShoulder2 = g_bcControls[8].bState ? 255 : 0; // Zoom Out
cs.LeftShoulder2 = g_bcControls[7].bState ? 255 : 0; // Zoom In
}
else
{
cs.RightShoulder2 = g_bcControls[1].bState ? 255 : 0; // Next Weapon
cs.LeftShoulder2 = g_bcControls[2].bState ? 255 : 0; // Previous Weapon
}

if (!ControlForwardsBackWards(cs))
{
Expand Down

1 comment on commit 4a4bcbc

@lopezloo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #524. From PR #2767.

Please sign in to comment.