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 - Define system for Vehicle Crashes / Explosions #7305

Closed
PabstMirror opened this issue Dec 15, 2019 · 8 comments
Closed

Medical - Define system for Vehicle Crashes / Explosions #7305

PabstMirror opened this issue Dec 15, 2019 · 8 comments

Comments

@PabstMirror
Copy link
Contributor

We need a plan for how to handle vehicle crashes and explosions (vehicle killed)

Current code: https://github.com/acemod/ACE3/blob/master/addons/medical_engine/functions/fnc_handleDamage.sqf#L190-L208

Problems

  • Only triggers on velocity, stationary vehicles being hit is a problem, but more critical is that sometimes the velocity seems to be reduced before the HD triggers.
    e.g. put chopper in air, and do w setVelocity [0,0,-100];
    often the velocity in HD is [0,0,-97.3566], but about 30% of the time it's a special value of [0,0,-0.1] which is not enough to trigger (seems like the velocity got reset before the frame starts?)
    I have seen transport chopper go down hard and explode, and then AI hop out and fight like nothing happened.

  • Inconstant damage. The raw HD is usually something like
    [wD,"",1,wD,"",-1,<NULL-object>,""]
    in vanilla this would always be fatal, but we can only translate it to a random hitpoint wound, which may not even cause unconsciousness.

  • Being alive inside a destroyed vehicle may cause problems.
    20191215132953_1
    There is an unconscious pilot in this picture 😄 but no way to see or interact with him. Should we auto-eject or trigger periodic damage for being inside a burning wreck? Right now you are actually safer inside the burning wreck because it seems to protect from "FuelExplosion" damage.

  • Exploding cars is dumb. So I'm mostly glad wrecks are more survivable, perhaps we can further reduce damage from "FuelExplosion" damage types? But Tanks that are cooking off should be dangerous. Aircraft should be extremely dangerous.

Ref
#6330 - Boats ejecting PR, somewhat related
#7304 - Manual tweak to make AIrcraft Crashes more Lethal

@kymckay
Copy link
Member

kymckay commented Dec 18, 2019

I think part of the solution for being alive in wrecks would be to add proper burning code.

@Sparker95
Copy link

Sparker95 commented Nov 18, 2020

Hi, I have just recalled that there is this command:
https://community.bistudio.com/wiki/isBurning
I've also checked and it also returns true when player is burning from a vehicle wreck.
So, maybe you could check your raw damage handler input you mentioned above [wD,"",1,wD,"",-1,<NULL-object>,""] in combination with isBurning and translate it into burning damage? I think it should be accurate enough?

@JNoXK
Copy link

JNoXK commented Mar 20, 2021

It isn't about exploding cars. People inside cars that get hit even with a Titan AT missile eject unharmed. The hot molten metal and fragments should surely cause some serious damage. But right now, not even a scratch for people inside stationary vehicles. For land vehicles, the cut-off speed is around 22 km/h. Above this speed, the people inside dies consistently.

@kymckay
Copy link
Member

kymckay commented Aug 13, 2021

I was doing some testing for #8278 and noticed that units inside exploding vehicle actually don't take any wound events until they get out.

While proper burning damage would help, perhaps we just need a direct vehicle killed event handler that causes explosion damage to all passengers (if the vehicle actually explodes, some don't, think there's a destruction effects config value that can be used to check and if not perhaps we need to introduce one to exclude certain vehicles).

Edit: Consider the scenario where a vehicle explodes via script (e.g. a jet in the air), the units inside should immediately take explosion damage as a direct result of the event. Currently they don't take any damage until they get out of the vehicle because there is no crash or projectile impact to cause damage which also causes destruction.

I see the OP mentions how vehicles exploding is dumb and I agree, but think that should be separated out into vehicle damage handling so that vehicle are never actually "killed" and explode. Medical should probably just reflect the explosion damage itself.

@pterolatypus
Copy link
Contributor

units inside exploding vehicle actually don't take any wound events

this is because it doesn't trigger the ace_hdbracket hitpoint, it just does 1 structural damage which is death in vanilla. I had a solution (removed from my PR as it was out of scope) because it does pass the correct ammo type FuelExplosion so the damage can be calculated manually.

@kymckay
Copy link
Member

kymckay commented Aug 13, 2021

Yes scratch my last suggestion with the EH, I like ptero's solution and had forgot it was coming down the pipeline 😃 Believe that + burning will resolve this issue when it hits

@Theopolus
Copy link

any work on this. the issue is still persistent and still a problem.

@Mike-MF
Copy link
Member

Mike-MF commented Sep 11, 2023

Closing due to age, inactivity or already solved. May be re-opened if the issue is still present, even better just open a new up-to-date Issue.

@Mike-MF Mike-MF closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants