-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Added ImpactRotation and ImpactPosition to WarheadArgs #17971
Conversation
Both |
Because for warheads, only the projectile position and rotation at the moment of impact matters, I don't see the point in setting them earlier or updating on the fly (that would just cost performance). I'm using them downstream for my directional armor implementation, which I might submit upstream after this (not sure if my approach would get conceptual approval, but maybe it will). |
Note: I'll hold off rebasing this until #18023 is merged (which hopefully won't take too much longer). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one naming comment/question.
I haven't tried testing this yet because this doesn't touch anything used in the upstream mods.
Allows to pass the horizontal facing/yaw and vertical angle/pitch of the carrier projectile to warheads for further use. Add ImpactPosition to WarheadArgs InflictDamage doesn't pass the impact pos directly, and the very point of WarheadArgs is to avoid adding more and more arguments to the warhead methods.
The ImpactOrientation needs to be computed from point of impact to target if the target wasn't hit directly. Also adapted warhead code to use WarheadArgs consistently, as well as pass HitShape instead of just HitShapeInfo (both needed for future and/or downstream features).
Rebased and updated. Note: Due to rebase conflicts caused by the recent Facing int->WAngle changes, I decided to merge the first 2 commits to save me from more rebase conflict hell. |
See commits for more details.
Mostly for downstream projects for now.
I'll provide an example testcase soon (probably tomorrow).