diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index a5ce32b9e0..cd0b4b1b27 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -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 {