-
Notifications
You must be signed in to change notification settings - Fork 739
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 Damage - Add alternate armor penetration #9217
base: master
Are you sure you want to change the base?
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>
…/ACE3 into rework-armor-penetration
I've realized a way to improve performance on this would be to move it to |
I'm happy with this for now. Ready for review. |
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.
This thing might "break" (just wouldn't do anything) in the following scenario:
Third party mod adds a wound handler to bullet
, but constructs the return array with [_unit, _allDamages, _typeOfDamage]
instead of modifying _this
by reference (both are allowed, as per docs). Said wound handler is called before this wound handler and "deletes" _ammo
from args.
No idea how likely it's in practice though.
addons/medical_damage/functions/fnc_woundsHandlerArmorPenetration.sqf
Outdated
Show resolved
Hide resolved
…ion.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
I'm aware of the breaking scenario and forgot to mention it. Should be fine to append ammo after each wound handler iteration if necessary if we don't want to break API to make this always work. |
* Public: No | ||
*/ | ||
// Baseline penetrability used for armor penetration calculation, see (https://community.bistudio.com/wiki/CfgAmmo_Config_Reference#caliber) | ||
#define ARMOR_PENETRABILITY 0.015 |
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.
Could be a setting? /shrug.
pushBackUnique will duplicate if someone changes the casing of the ammo string but I see no reason to do that and it shouldn't break anything |
What worries me in that scenario is if we decide to add more parameters in the future, where it could cause issues. |
Then I'd say the custom wound handler system is new enough that we can break BWC and help users in updating if that's the case. Still need a better approach though. |
If it was added in #8278, then I'd agree it's recent enough, but other opinions are welcome. |
When merged this pull request will:
Requires #10573.
Armor is converted to RHAe ( pulled from
\a3\Data_F\penetration\*.bisurf
) based on its scaled value and ignored based on projectile's ability to penetrate material.Balanced around ACE ammo values. We don't have to worry about 3rd party armor values because of #9216 and an armor soft-cap (at RHAe 110m) implemented in this PR. Overpenetration and angle of incidence are taken into account naturally by using impact damage to calculate impact speed, I actually trust the engine's handling of this more than whatever math we cook up.
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.