Skip to content
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

fix: empty underslung gun doesnt prevent going into firing mode UI #4292

Conversation

ekaratzas
Copy link
Contributor

Without this fix having an empty underbarrel mod/gun like the grenade launcher prevents the player from activating the firing ui via 'f'. This is especially troublesome as most players, including myself, only know how to change firing modes via this UI. This effectively prevents players from switching firing mode to the main weapon.

Purpose of change

This change allows the player to activate firing mode UI via 'f' in the case where the underslung gun/mod is out of ammo but the main gun still has ammo. This is especially confusing for most players as they are used to changing firing modes from this UI only.

Fixes #3966

Describe the solution

Solution simply checks if any of the gun modes of the current weapon ca be fired at the moment, not just the 'currently selected one'.

Describe alternatives you've considered

Testing

Spawn character with m4 carbine and m320 grenade launcher. Attach them together. switch to GLM and shoot it once. See that 'f' can still activate firing UI and you can switch firing modes from there and keep shooting the main gun.

firing_mode_empty_glm

Additional context

Checklist

@github-actions github-actions bot added the src changes related to source code. label Mar 4, 2024
chaosvolt
chaosvolt previously approved these changes Mar 4, 2024
src/avatar_action.cpp Outdated Show resolved Hide resolved
Without this fix having an empty underbarrel mod/gun like the grenade
launcher prevents the player from activating the firing ui via 'f'.
This is especially troublesome as most players, including myself,
only know how to change firing modes via this UI. This effectively
prevents players from switching firing mode to the main weapon.
@ekaratzas ekaratzas force-pushed the fix-empty-underslung-gun-firing-mode branch from 581c05d to b0ab5c7 Compare March 4, 2024 03:59
@ekaratzas ekaratzas requested a review from scarf005 March 4, 2024 04:00
@scarf005 scarf005 merged commit 34a0225 into cataclysmbnteam:main Mar 4, 2024
13 checks passed
@ekaratzas ekaratzas deleted the fix-empty-underslung-gun-firing-mode branch March 10, 2024 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Underslung guns disable their main weapon when they run out of ammo
3 participants