ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Medical Engine - Add vehicle explosion handling

Open pterolatypus opened this issue 2 years ago • 4 comments

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}.

pterolatypus avatar Mar 02 '22 14:03 pterolatypus

~~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.

LinkIsGrim avatar Mar 03 '22 06:03 LinkIsGrim

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.

kymckay avatar Mar 25 '22 17:03 kymckay

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.

pterolatypus avatar Mar 25 '22 18:03 pterolatypus

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.

pterolatypus avatar Jun 10 '22 13:06 pterolatypus

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

tbeswick96 avatar Oct 15 '22 15:10 tbeswick96

Done in #9246

LinkIsGrim avatar Oct 20 '23 06:10 LinkIsGrim