Make bots affected by chaingun jitter#3057
Merged
slipher merged 4 commits intoUnvanquished:masterfrom Nov 1, 2024
Merged
Conversation
Don't 'cheat' by modifying player state directly. There is no functional difference here in how the bots behave. Just an architectural fix.
When aiming at an enemy, bots will now be affected by view direction disturbances added via delta_angles. Chaingun jitter, trappers, and wallwalk use this.
Contributor
Author
|
It's now ready. I accounted for the 3 places that set the bot's pitch angle directly and tested them. |
Member
|
I'll cherrypick on my server for testing and report back. |
Member
|
I followed bots equiped with chaingun attacking buildables (so, a non-moving target), and indeed they're affected by the jitter. |
Contributor
What is your conclusion? |
slipher
added a commit
to slipher/Unvanquished
that referenced
this pull request
Jan 15, 2025
Fixes Unvanquished#3273, a regression in 1530111. Before PR Unvanquished#3057 pounce and barb aim also didn't correct for delta angles, but that flaw was masked by the movement code frequently setting the delta angles.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When bots are aiming at enemies, don't erase the view angle perturbations enforced through
delta_angles. This makes bots affected by chaingun shake. This also affects bots in trappers, but it's harder to characterize the difference there.Since low-skill bots were then too bad at aiming with chaingun due to the upward drift while firing, I made bots take into account the determinic upward part of the view angle deflection.
Still draft because I need to fix some vertical navcon-related code that sets an absolute value for the pitch angle. The
Obey usercmd_t protocol to set bot view anglescommit needs to be updated to fix that part.