ACE3
ACE3 copied to clipboard
Medical Engine - Add vehicle explosion handling
When merged this pull request will:
- Add damage handling for units inside vehicles that explode
Implementation moved from #8278, also see #8752
It's currently a bit extreme but comparable to what a unit standing next to the vehicle experiences, and it's probably going to be an instakill anyway so not super important.
IMPORTANT
- [x] If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
- [x] Development Guidelines are read, understood and applied.
- [x] Title of this PR uses our standard template
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.
~~Can't configOf
be used on _ammo
(or the projectile)? Might save some microseconds.~~
~~I remember (maybe incorrectly) using the command succesfully on mines and projectiles.~~
Derp, HandleDamage doesn't have the projectile directly. Ignore everything.
I notice #8752 includes a check to filter out destruction of vehicles which don't explode (iiirc rubber dinghy would be one), is that not needed?
Otherwise I like the logic here. Another thing that other PR includes is setting the crew on fire, but I'm not sure if that should occur from here or be picked up elsewhere using an event or similar.
Phone spazzing out a bit there...
I would expect those vehicles to not raise a damage event, though I haven't tested it.
As for setting the crew on fire I'm not sure if its necessary as the damage is pretty extreme, but if we did add it would prefer a separate event to integrating with HD.
If we wanted to automatically unload the crew this might be a good place to do it though.
Can confirm, vehicles that don't explode don't trigger HandleDamage. As for ejecting the crew, I might make a separate PR for that as I have some ideas.
IMO this is good to go.
What's the intended hit case for this? I'm testing it out as I've got an issue where vehicles fully blown up by a missile/bomb just have the AI units inside get out as if nothing happened and walk away.
I've messed around with this and found replacing the {_ammo isKindOf "FuelExplosion"}
check with {GET_NUMBER(configFile >> "CfgAmmo" >> _ammo >> "explosive",0) == 1}
and tweaking {_damage == 1}
to {_damage >= 1}
helps a bit the above case, but I'm not sure if that was the point of this handling block. Even so, troops still just get out of the burning wreck.
https://www.youtube.com/watch?v=wPQ5LPxjJTA This is latest CBA and ACE only. Using this PR has the same effect. Settings imported from this file https://github.com/uksf/modpack/blob/main/cba_settings.sqf
Done in #9246