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

Artillery rangletables (universal) #6853

Merged
merged 38 commits into from
Dec 17, 2019
Merged

Artillery rangletables (universal) #6853

merged 38 commits into from
Dec 17, 2019

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Mar 8, 2019

Ref #4080

Universal rangetables for any artillery
Generated by new extension
Some bits based on mk6

3 main components to the addon

  • Show accurate elevation and azimuth
    This has been a real pain to deal with, (e.g. aim at sky vs aim at ground and you get radically different results). Short mortars also seem to need a different approach to calculate, elevation calc has improved from the mk6 code.
  • Show rangetables for weapons
    New extension to handle calculating all values at runtime, should be multithreaded, non-blocking.
  • Apply air resistance (optional)
    There is no config air resistance so it's not that bad, I tried using CBA_fnc_waitUntilAndExecute because it's pretty lightweight and actual round count should be low.

WIP for now so don't worry about the small stuff
Possible issues:

  • Keep testing mods for compatibility issues
  • Rocket artillery the ammo deploys a submunition in flight, have to think about applying air resistance to the child?
  • Vehicle's huds will still show degrees, Mk6 replaced the hud, but I can't do that universally. Right now it will just display the angles in the upper right and the (incorrect) degrees will remain on the hud.
    ex

@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Mar 8, 2019
@PabstMirror PabstMirror added this to the Ongoing milestone Mar 8, 2019
@Blutze
Copy link
Contributor

Blutze commented Mar 9, 2019

Aren't rocket artillery submunitions deployed only like, 200-300 meters slope distance from the target? I'd rather worry about heavily scripted special ammo like https://en.wikipedia.org/wiki/SMArt_155... if you have to respawn the projectile at the vector and velocity determined by this system, those scripts might not get triggered. Similar to RHS impact hand grenades with Advanced Throwing.

Semi-related: Couldn't Frag be rewritten with the Jets DLC submunition system?

Copy link
Member

@TheMagnetar TheMagnetar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some suggestions on the C++.

extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
extensions/artillerytables/artillerytables.cpp Outdated Show resolved Hide resolved
@dedmen
Copy link
Contributor

dedmen commented Mar 13, 2019

Have to remove your debug printf's before merging.
And someone in Slack talked about checking if there is a solvable algo for that?

@PabstMirror
Copy link
Contributor Author

// printf will be removed by the preprocessor 😉

I don't think there is a solution for v^2 wind resistance
ref https://www.youtube.com/watch?v=uq4cg0MtzVo&t=792
keep in mind I need 3d, not 2d, time of flight and handle stopping at a given height

but I could be wrong
I didn't have much to base this on, so it's written naively and pretty much just brute forces the solution

- improve compat with a3 mlrs with remote cam (animationSourcePhase)
- handle non [0] turrets (rhs prp)
- add config entries
- use vectorCos to fix fp error (thanks commy)
@PabstMirror PabstMirror changed the title WIP: Artillery rangletables (universal) Artillery rangletables (universal) Mar 22, 2019
@PabstMirror PabstMirror changed the base branch from master to cswSuperBranch June 8, 2019 05:16
@PabstMirror PabstMirror changed the base branch from cswSuperBranch to master September 4, 2019 01:32
@PabstMirror PabstMirror modified the milestones: Ongoing, 3.13.0 Oct 15, 2019
@PabstMirror PabstMirror merged commit 8e3fd45 into master Dec 17, 2019
@PabstMirror PabstMirror deleted the artilleryTables branch December 17, 2019 16:14
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.13.0-temp3 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants