-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for Mangler charged shots when attack2fire is enabled #1
Conversation
I did think about it when I was implementation |
Fair enough. The bigger issue for me was that I was trying to do a charged shot, it wasn't working and I didn't immediately know why. Currently attack2fire is on by default, and without knowing that or knowing more broadly about this plugin and how each of the settings work, I would argue it can be a bit of a confusing experience (as it was for me). In my view, as long as attack2fire remains opt-out by default, core weapon functionality such as alt-fire charged shots should continue to work as expected.
I don't mind this solution, although I would argue that the default should become 2 in that case for better UX (i.e. it would make disabling charged shots a purposeful decision rather than one where the user has to hunt down a reason for why it's not working). All good if you disagree with this assessment, though. After all, choosing to do a charged setup is reasonably uncommon. You make the call. |
To me it makes the most sense to have |
OK, sounds good. Feel free to refactor/change any of how I implemented this. |
Seems good. Going to also make it override +attack2 while +attack is held and some other misc stuff. Also going to remove the |
I think you added it to handle when clip ammo and reserve ammo reach 0 for all non-Mangler launchers. Without that check, once you reach 0 ammo, the weapon stays equipped rather than switching to the next usable weapon ( |
I don't remember that being the reason, but it's enough reason to add it back. Thanks for checking. |
Currently alt-fire charged shots do not work with the Cow Mangler 5000 when attack2fire is enabled because
m_flNextSecondaryAttack
will always be set tog_globals.curtime + 0.5
:jumpqol/jumpqol.sp
Lines 2838 to 2841 in 306739d
This PR adds a check for if the Mangler is fully charged, and if so, sets
m_flNextSecondaryAttack
tog_globals.curtime - g_globals.interval_per_tick
.The Mangler is not affected by the same reload problem fixed in 9002a10 when all ammo runs out (+
m_iClip1
doesn't decrement), so that check no longer runs.