Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Client/core/CKeyBinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ void CKeyBinds::DoPostFramePulse()

// * Enter Exit
// * Change View
cs.ButtonSquare = (!bEnteringVehicle && g_bcControls[11].bState) ? 255 : 0; // Jump
cs.ButtonSquare = (!bEnteringVehicle && !bAimingWeapon && g_bcControls[11].bState) ? 255 : 0; // Jump
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this doesn’t remove the ability to jump while holding other weapons without zoom capability, e.g., can you still jump while holding a Desert Eagle? It seems to me that this issue only affects sniper and camera, since holding shift actually lets you zoom with them. But generally using bAiming seems like it will block jump for all weapons while aiming. Is that the intended effect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the observation. I also tested it, and I can still jump while holding other weapons normally.
bAimingWeapon only becomes true when actively aiming with specific weapons that create a TASK_SIMPLE_USE_GUN task (snipers/camera). When aiming with regular weapons like Desert Eagle, no such task is created, so bAimingWeapon remains false and jumping works normally. so fix is specifically targets the zoom-capable weapons

cs.ButtonCross = (g_bcControls[12].bState) ? 255 : 0; // Sprint
cs.ShockButtonR = (g_bcControls[13].bState) ? 255 : 0; // Look Behind
cs.ShockButtonL = (g_bcControls[14].bState) ? 255 : 0; // Crouch
Expand Down