mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3318 from acemod/restricMagPass
Don't allow passing mags when not in same veh
This commit is contained in:
@ -18,11 +18,11 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
params ["_player", "_target", "_weapon"];
|
params ["_player", "_target", "_weapon"];
|
||||||
private ["_compatibleMags"];
|
|
||||||
|
|
||||||
if (!GVAR(enableMagazinePassing)) exitWith {false};
|
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"];
|
_x params ["_className", "", "_loaded"];
|
||||||
if ((_className in _compatibleMags) && {!_loaded} && {_target canAdd _className}) exitWith {true};
|
if ((_className in _compatibleMags) && {!_loaded} && {_target canAdd _className}) exitWith {true};
|
||||||
|
Reference in New Issue
Block a user