Medical Engine - Remove ACE_HDBracket hitpoint
When merged this pull request will:
- Arma 2.16 adds "context" param to HD which lets us know if we're at the last iteration of the event: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage
- Some stuff had to be moved around in the function but it'll work the same.
- While this means that medical will still work even with broken inheritance now, arm/leg hitpoints could still be missing due to the same issue. I've added a check for presence of those hitpoints, but it's slower than just checking HDBracket by about 25% (0.05ms for 1k iterations vs. 0.04ms). This is only relevant at unit init, and time is saved during damage events (which is where performance suffers most) by reducing a hitpoint.
I'm looking into whether it's possible to simplify more of the function via other events or the directHit param.
IMPORTANT
- If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
- Development Guidelines are read, understood and applied.
- Title of this PR uses our standard template
Component - Add|Fix|Improve|Change|Make|Remove {changes}.
Looks like this has been pushed to 2.18 https://community.bistudio.com/wiki?title=Arma_3:_Event_Handlers#HandleDamage
Check if this made it into 2.16 or not. SPOTREP says it did.
Made it into 2.16. Just need to fix merge conflicts
I was not expecting this at all and thought we had more time for 2.16.
Eh, it'll work.
Don't we need to include this in 3.17.0 for 2.16 compatibility?
Nothing breaks AFAIK
Doesn't seem like anything breaks, at least for "normal" damage (being shot, being driven over and falling). I didn't test very much, I feel more in depth testing could be better done by an RC.
I played around with this for about an hour or so, tried a bunch of things to cause different types of injury, no obvious issues or errors.
Only change this PR needs to address now is this: https://github.com/acemod/ACE3/blob/565d64d50ed775dafbbefafe05457577e955712b/addons/medical/XEH_preStart.sqf#L5
Green button go brrt (flood my inbox if something breaks)