Projectile underrange corrections#7385
Draft
efrec wants to merge 7 commits intobeyond-all-reason:masterfrom
Draft
Projectile underrange corrections#7385efrec wants to merge 7 commits intobeyond-all-reason:masterfrom
efrec wants to merge 7 commits intobeyond-all-reason:masterfrom
Conversation
Contributor
Collaborator
Author
|
Before: many misses, inaccuracy is almost always short, even hits are shallow/short. 2026-04-09_23-23-52.mp4After: few misses, inaccuracy seems random, hits are solid. 8mb.video-CL1-wRQxMes7.mp4 |
sprunk
reviewed
Apr 10, 2026
Co-authored-by: sprunk <spr.ng@o2.pl>
Collaborator
Author
added 2 commits
April 12, 2026 21:44
a367cf6 to
c486eb0
Compare
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.

Work done
This offsets the recent targetborder change – which caused units to aim at the nearest point on their targets – by redirecting the fired projectile toward the target's center-mass as though it were aimed and fired with targetborder = 0.
The correction consists of a few steps:
These steps also respect the weapon's maximum lead limit, do not allow redirecting the projectile beyond its normal range, and restricts the maximum angle of correction to a reasonable size.
Asked Gemini nicely for an image and it got me 25% of the way to this:
Addresses Issue(s)
Units like Legion Gladiators appear functional on paper with decent stats for extended skirmishes, but they show catastrophic DPS loss (zero DPS) against the retreat. We saw this repeatedly during Faction Wars on any map open enough for medium tanks. This was not my previous experience with the unit before, so I highly suspect the target border change.
When I'd considered tweaks to those units, one possibility was to make their accuracy and lead prediction worse, since this actually makes some shots hit by random chance. We should avoid unintuitive configuration in general, but this was especially bad to me. Worse prediction should not give better prediction.
Testing
In my testing, the difference in the initial velocity is very small, but the chance to hit retreating units is noticeably higher (still poor) on units with slow plasma projectiles. I am satisfied that it is an improvement to BAR's unit IQ and to plasma units in general.
This is not quite a full solution for BAR's kiting advantage. ZeroK explored an option to do that: weapon_projectile_retarget.lua
I think that is a pretty good solution, also, but it wasn't what I'd intended to do. If a more complete concept is wanted, then I'd need to test against these, as well.