mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Engine - Disable uniform passthrough scaling, increase passthrough effect on vests (#9524)
* add separate pow for vests * missing 0.02 * skip uniform scaling * mathity math mamath
This commit is contained in:
parent
0f38de2bd0
commit
be6582ea44
@ -32,8 +32,10 @@ if (isNil "_return") then {
|
||||
};
|
||||
|
||||
private _itemInfo = configFile >> "CfgWeapons" >> _item >> "ItemInfo";
|
||||
private _itemType = getNumber (_itemInfo >> "type");
|
||||
private _passThroughEffect = [1, 0.6] select (_itemType == TYPE_VEST);
|
||||
|
||||
if (getNumber (_itemInfo >> "type") == TYPE_UNIFORM) then {
|
||||
if (_itemType == TYPE_UNIFORM) then {
|
||||
private _unitCfg = configFile >> "CfgVehicles" >> getText (_itemInfo >> "uniformClass");
|
||||
if (_hitpoint == "#structural") then {
|
||||
// TODO: I'm not sure if this should be multiplied by the base armor value or not
|
||||
@ -53,9 +55,13 @@ if (isNil "_return") then {
|
||||
};
|
||||
|
||||
// Scale armor using passthrough to fix explosive-resistant armor (#9063)
|
||||
// Skip scaling for items that don't cover the hitpoint to prevent infinite armor
|
||||
if (_armor isNotEqualTo 0) then {
|
||||
_armorScaled = (log (_armor / _passThrough)) * 10;
|
||||
// Skip scaling for uniforms and items that don't cover the hitpoint to prevent infinite armor
|
||||
if (_armor > 0) then {
|
||||
if (_itemType == TYPE_UNIFORM) then {
|
||||
_armorScaled = _armor;
|
||||
} else {
|
||||
_armorScaled = (log (_armor / (_passThrough ^ _passThroughEffect))) * 10;
|
||||
};
|
||||
};
|
||||
_return = [_armor, _armorScaled];
|
||||
GVAR(armorCache) set [_key, _return];
|
||||
|
Loading…
Reference in New Issue
Block a user