2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: bux578
|
|
|
|
*
|
|
|
|
* Gets the turret index of door gunners
|
2015-01-12 04:02:33 +00:00
|
|
|
*
|
2015-01-11 16:42:31 +00:00
|
|
|
* Argument:
|
|
|
|
* 0: Vehicle type (String)
|
2015-01-12 04:02:33 +00:00
|
|
|
*
|
2015-01-11 16:42:31 +00:00
|
|
|
* Return value:
|
|
|
|
* Turret indexes of the door gunner. Empty array means no gunner position. (Array)
|
|
|
|
*/
|
2015-01-12 18:22:58 +00:00
|
|
|
#include "\z\ace\addons\common\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private ["_vehicleType", "_turrets", "_doorTurrets", "_config"];
|
|
|
|
|
|
|
|
_vehicleType = _this select 0;
|
|
|
|
|
2015-01-11 18:20:14 +00:00
|
|
|
_turrets = [_vehicleType] call FUNC(getTurrets);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
_doorTurrets = [];
|
|
|
|
|
|
|
|
{
|
|
|
|
_config = configFile >> "CfgVehicles" >> _vehicleType;
|
2015-01-11 18:20:14 +00:00
|
|
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
|
|
|
|
_doorTurrets pushBack _x;
|
|
|
|
};
|
|
|
|
} forEach _turrets;
|
|
|
|
|
|
|
|
_doorTurrets
|