Interaction - Disable magazine passing to dead and unconscious units (#10091)

* Disable magazine passing to dead units

* Disable for unconscious units as well
This commit is contained in:
johnb432 2024-06-28 14:41:04 +02:00 committed by GitHub
parent bfa23f01db
commit a30afe69b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@
params ["_player", "_target", "_weapon"]; params ["_player", "_target", "_weapon"];
if (!GVAR(enableMagazinePassing)) exitWith {false}; if (!GVAR(enableMagazinePassing)) exitWith {false};
if (_weapon isEqualTo "") exitWith {false}; if (_weapon isEqualTo "" || {!(_target call EFUNC(common,isAwake))}) exitWith {false};
if (((vehicle _target) != _target) && {(vehicle _target) != (vehicle _player)}) exitWith {false}; if (((vehicle _target) != _target) && {(vehicle _target) != (vehicle _player)}) exitWith {false};
private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines;