2015-04-03 15:43:41 +00:00
|
|
|
/*
|
|
|
|
* Author: esteldunedain
|
|
|
|
* Checks if the turret occupied by the given unit has a laser designator
|
|
|
|
*
|
2015-08-15 21:53:04 +00:00
|
|
|
* Arguments:
|
2015-04-03 15:43:41 +00:00
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
2015-08-15 21:53:04 +00:00
|
|
|
* Return Value:
|
2015-08-28 10:58:53 +00:00
|
|
|
* Has unit designator <BOOL>
|
2015-08-15 21:53:04 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-04-03 15:43:41 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-15 21:53:04 +00:00
|
|
|
params ["_unit"];
|
2015-04-03 15:43:41 +00:00
|
|
|
|
|
|
|
// Get the player turret path
|
|
|
|
private ["_turret","_config","_turretConfig"];
|
|
|
|
_turret = [_unit] call EFUNC(common,getTurretIndex);
|
|
|
|
_config = configFile >> "CfgVehicles" >> typeOf vehicle _unit;
|
|
|
|
_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath);
|
|
|
|
|
|
|
|
getNumber (_turretConfig >> QGVAR(Enabled)) > 0
|