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

Medical Engine - Add vehicle explosion handling #8832

Closed

Conversation

pterolatypus
Copy link
Contributor

@pterolatypus pterolatypus commented Mar 2, 2022

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

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

@LinkIsGrim
Copy link
Contributor

LinkIsGrim commented Mar 3, 2022

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.

@kymckay
Copy link
Member

kymckay commented Mar 25, 2022

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.

@pterolatypus
Copy link
Contributor Author

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.

@kymckay kymckay added this to the 3.14.2 milestone Apr 23, 2022
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label May 5, 2022
@PabstMirror PabstMirror modified the milestones: 3.14.2, 3.15.0, 3.15.1, Ongoing May 17, 2022
@pterolatypus
Copy link
Contributor Author

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.

@tbeswick96
Copy link
Contributor

tbeswick96 commented Oct 15, 2022

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

@LinkIsGrim LinkIsGrim self-assigned this Jun 22, 2023
@LinkIsGrim
Copy link
Contributor

Done in #9246

@jonpas jonpas modified the milestones: Ongoing, 3.16.0 Oct 20, 2023
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.

7 participants