diff --git a/addons/main/functions/fnc_handleDamageEh.sqf b/addons/main/functions/fnc_handleDamageEh.sqf index be59714..199e0b7 100644 --- a/addons/main/functions/fnc_handleDamageEh.sqf +++ b/addons/main/functions/fnc_handleDamageEh.sqf @@ -67,5 +67,5 @@ _hitPoint = [_hitPoint, "hit", ""] call CBA_fnc_replace; private _var = format ["GVAR(lastHandleDamage)$%1", _hitPoint]; if ((_unit getVariable [_var, -1]) isEqualTo _realDamage) exitWith {_curDamage}; _unit setVariable [_var, _realDamage]; -[_unit, _realDamage, _hitPoint, [_instigator, _source] select (isNull _instigator)] call FUNC(receiveDamage); +[_unit, _realDamage, _hitPoint, [_source, _instigator] select (isNull _source)] call FUNC(receiveDamage); 0 diff --git a/addons/main/functions/fnc_handleDamageEhACE.sqf b/addons/main/functions/fnc_handleDamageEhACE.sqf index 7005cf5..65209c7 100644 --- a/addons/main/functions/fnc_handleDamageEhACE.sqf +++ b/addons/main/functions/fnc_handleDamageEhACE.sqf @@ -22,9 +22,9 @@ if (_hitPoint isEqualTo "") then { if (!isDamageAllowed _unit || {_hitPoint in ["hithead", "hitbody", "hithands", "hitlegs"] || {_unit getVariable ["ace_medical_allowDamage", false]}}) exitWith {_curDamage}; if (GVAR(disallowFriendfire) && - {!isNull _instigator && { - _instigator isNotEqualTo _unit && { - (side group _unit) isEqualTo (side group _instigator)}}}) exitWith {_curDamage}; + {!isNull _shooter && { + _shooter isNotEqualTo _unit && { + (side group _unit) isEqualTo (side group _shooter)}}}) exitWith {_curDamage}; private _newDamage = _damage - _curDamage; if (_newDamage isEqualTo 0) exitWith { diff --git a/addons/main/functions/fnc_hitEh.sqf b/addons/main/functions/fnc_hitEh.sqf index e8ef935..a49fabb 100644 --- a/addons/main/functions/fnc_hitEh.sqf +++ b/addons/main/functions/fnc_hitEh.sqf @@ -16,4 +16,4 @@ if (isNull _instigator) exitWith { }; }; -[_unit, _damage, "body", [_instigator, _source] select (isNull _instigator)] call FUNC(receiveDamage); +[_unit, _damage, "body", [_source, _instigator] select (isNull _source)] call FUNC(receiveDamage);