2015-09-18 11:09:40 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Check if the unit can use a Weapon.
|
|
|
|
* Returns true if the unit is on foot or in a FFV position.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Can the Unit use Weapons <BOOL>
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
params [["_unit", objNull, [objNull]]];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
if (_unit == vehicle _unit) exitWith {true};
|
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
private _config = configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _unit;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
isClass _config
|
|
|
|
&& {getNumber (_config >> "canPullTrigger") == 1}
|