ACE3/addons/overheating/functions/fnc_canUnjam.sqf

26 lines
468 B
Plaintext
Raw Normal View History

/*
* Author: Commy2 and esteldunedain
* Return true if the unit can unjam it's current weapon
*
* Arguments:
* 0: Player <OBJECT>
*
* Return Value:
* Bool
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
TRACE_1("_unit",_unit);
private _jammedWeapons = _unit getVariable [QGVAR(jammedWeapons), []];
if !(currentWeapon _unit in _jammedWeapons) exitWith {
false
};
2016-02-22 21:03:40 +00:00
if !([_unit] call CBA_fnc_canUseWeapon) exitWith {
false
};
true