Skip to content

Zoom In/Out key binding fixes #2767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 21, 2022
Merged
14 changes: 11 additions & 3 deletions Client/core/CKeyBinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1920,9 +1920,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