mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add registering last damage source
This commit is contained in:
parent
7646068a8b
commit
e0a65aa543
@ -77,6 +77,10 @@ _minLethalDamage = if (_typeIndex >= 0) then {
|
||||
0.01
|
||||
};
|
||||
|
||||
if (!isNull _shooter) then {
|
||||
_unit setvariable [QGVAR(lastDamageSource), _shooter, false];
|
||||
};
|
||||
|
||||
private _vehicle = vehicle _unit;
|
||||
private _effectiveSelectionName = _selection;
|
||||
if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_shooter in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selection == ""}) then {
|
||||
@ -98,6 +102,7 @@ if ((_minLethalDamage <= _newDamage) && {[_unit, [_effectiveSelectionName] call
|
||||
_damageReturn = _damageReturn min 0.89;
|
||||
};
|
||||
|
||||
|
||||
[_unit] call FUNC(addToInjuredCollection);
|
||||
|
||||
if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith {
|
||||
|
Loading…
Reference in New Issue
Block a user