-
Notifications
You must be signed in to change notification settings - Fork 736
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 - Add damage handling for explosive damage while inside vehicles #9246
Medical - Add damage handling for explosive damage while inside vehicles #9246
Conversation
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
…om/Salluci/ACE3 into feature/vehicleExplosion-grimpatch
…into feature/vehicleExplosion-grimpatch
…into feature/vehicleExplosion-grimpatch
might be able to remove this code after this PR |
|
||
// hitpoints are randomized, more damage means more wounds in different body parts | ||
for "_i" from 1 to (_damageToApply * 6) do { | ||
_newDamages pushBack [_damageToApply * 6, selectRandom ALL_BODY_PARTS, _damageToApply * 6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the 6x on line 32, but not sure I get where the 6x on 33 is coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, scaling. Though looking at this again now I'd rather rewrite this loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remembered: damage here is only gotten from #structural
hitpoint and only available in 0-1
range, typically very low. So it's multiplied by 6 to account for it representing damage to each limb, sorta. It feels right in game IMO.
private _realDamage = _newDamage * _armor; | ||
if (_hitPoint isNotEqualTo "#structural") then { | ||
_newDamage = _newDamage * (_armor/_armorScaled); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could make this scaling a setting?
just a 0-1 lerp between old way and new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
this is very subjective but I think it's ok if some explosions are survivable |
I'm okay with vehicle explosions being sometimes survivable, though that is mostly going to be handled by |
This needs testing/compatibility with AVD, as that damages crew based on damage sustained by the vehicle. Need to check if it doesn't become excessive. |
…plosion-grimpatch
AVD doubles up on the damage inflicted. |
Code looks ok, I did not test it. |
addons/medical_damage/functions/fnc_woundsHandlerVehiclehit.sqf
Outdated
Show resolved
Hide resolved
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Yell at me if this breaks. Focus testing concern on RC. |
When merged this pull request will:
ace_medical_engine_fnc_handleDamage
toobjectParent
. It's faster and handles dead units.Continuation of @pterolatypus #8832. Includes #9216, should be merged alongside/after.
I wasn't able to figure out why damage from vehicle explosions can be negative, but just using
abs
value puts wounds at where they should be anyway.Doesn't completely guarantee lethality from catastrophic explosions because of the random body part roll. Should it? I feel like the chance for survival is low enough anyway (have to not roll head or body six times at damage = 1).
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.