From 4a8b032c1fab8321fad12504d412f59c7dbaeeec Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 14 Feb 2016 14:53:04 -0600 Subject: [PATCH] Don't allow passing mags when not in same veh --- addons/interaction/functions/fnc_canPassMagazine.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/interaction/functions/fnc_canPassMagazine.sqf b/addons/interaction/functions/fnc_canPassMagazine.sqf index 1c1dd1bb2d..66c560c271 100644 --- a/addons/interaction/functions/fnc_canPassMagazine.sqf +++ b/addons/interaction/functions/fnc_canPassMagazine.sqf @@ -18,11 +18,11 @@ #include "script_component.hpp" params ["_player", "_target", "_weapon"]; -private ["_compatibleMags"]; if (!GVAR(enableMagazinePassing)) exitWith {false}; +if (((vehicle _target) != _target) && {(vehicle _target) != (vehicle _player)}) exitWith {false}; -_compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines"); +private _compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines"); { _x params ["_className", "", "_loaded"]; if ((_className in _compatibleMags) && {!_loaded} && {_target canAdd _className}) exitWith {true};