-
Notifications
You must be signed in to change notification settings - Fork 0
Artillery prediction fix #374
Comments
Adam Olsen <rhamph+warzone@...> uploaded file |
Zarel changed status from |
Zarel set owner to |
Zarel commented Yay, math! |
Adam Olsen <rhamph+warzone@...> uploaded file Handle EMP as well |
Adam Olsen <rhamph+warzone@...> commented New version, handles delays due to EMP. Seems to work for artillery, but I didn't find a convenient example of normal direct weapons having problems to test with. |
Zarel changed status from |
Zarel set resolution to |
Zarel commented Committed in [7155]. |
Adam Olsen <rhamph+warzone@...> commented Indirect fire has four range categories (for trajectory purposes, not hit chance purposes): Long: fixed angle, variable (high) velocity My previous patch confused the point blank/short threshold for the medium/long threshold. My new patch fixes this, although the threshold itself is a little fuzzy. The original code had correct prediction for point blank and medium. My previous patch added correct prediction for long. However, there is still no correct prediction for short. Short also has significant problems with height differences, so it is often unable to hit targets that are much lower than it. I've added an extra range check (psStats->minRange < TILE_UNITS*3) to reduce how often it gets used, but I've been unable to eliminate it (without making point blank excessively large.) IMO, there's a lot of ugliness here, but I want to get the medium/long threshold fixed before getting too deep in fixing other things. I did add a small check for projectiles passing below the map, but that's usually because they skipped past their real target. |
Adam Olsen <rhamph+warzone@...> uploaded file |
Zarel changed status from |
Zarel changed resolution from |
Rhamphoryncus uploaded file Missed a bit. Bluh. |
Per commented That last patch is full of noise. |
Rhamphoryncus commented Sorry, ignore it, 3 is right. |
Buginator changed priority from |
Buginator commented Just a FYI, this is a git patch, so I couldn't apply it at this time. Changing priority to blocker, since, we need a fix. |
Rhamphoryncus uploaded file |
Rhamphoryncus commented Version 4, latest in the escapade:
|
Per uploaded file Normal diff instead of git diff |
Buginator commented (In [7383]) Artillery prediction fix. fixes #374 |
Buginator changed status from |
Buginator changed resolution from `` to |
Buginator commented (In [7384]) Artillery prediction fix. fixes #374 |
Buginator removed milestone (was |
Buginator commented Milestone 2.2 deleted |
resolution_fixed
type_bug
| by Adam Olsen <rhamph+warzone@...>The target prediction code assumes all projectiles use a constant speed. Normally this is true, but artillery varies its speed to maintain a ballistic trajectory at longer ranges.
This patch uses sqrt(dist)/30 as a flight time predictor. This is totally a guess and a bodge, but seems fairly effective.
The prediction is still fairly naïve in a number of ways:
Issue migrated from trac:374 at 2022-04-15 18:08:07 -0700
The text was updated successfully, but these errors were encountered: