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:
|
2015-03-25 21:50:28 +00:00
|
|
|
* 0: Vehicle (Object)
|
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-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
private ["_turrets", "_doorTurrets", "_config"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
PARAMS_1(_vehicle);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-03-25 21:50:28 +00:00
|
|
|
_turrets = allTurrets [_vehicle, true];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
_doorTurrets = [];
|
|
|
|
|
|
|
|
{
|
2015-05-14 18:06:06 +00:00
|
|
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
|
|
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
|
|
|
|
_doorTurrets pushBack _x;
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
} forEach _turrets;
|
|
|
|
|
|
|
|
_doorTurrets
|