mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
tweak turret functions
This commit is contained in:
parent
9f540e0473
commit
dea830441b
@ -4,7 +4,7 @@
|
|||||||
* Get the commander config of a vehicles turret.
|
* Get the commander config of a vehicles turret.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: vehicle type (String)
|
* 0: vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Commander config (Config)
|
* Commander config (Config)
|
||||||
@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||||
|
|
||||||
[_config, _turret] call FUNC(getTurretConfigPath)
|
[_config, _turret] call FUNC(getTurretConfigPath)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Get the gunner config of a vehicles turret.
|
* Get the gunner config of a vehicles turret.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: vehicle type (String)
|
* 0: vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Gunner config (Config)
|
* Gunner config (Config)
|
||||||
@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||||
|
|
||||||
[_config, _turret] call FUNC(getTurretConfigPath)
|
[_config, _turret] call FUNC(getTurretConfigPath)
|
||||||
|
@ -4,23 +4,23 @@
|
|||||||
* Gets the turret index of door gunners
|
* Gets the turret index of door gunners
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle type (String)
|
* 0: Vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Turret indexes of the door gunner. Empty array means no gunner position. (Array)
|
* Turret indexes of the door gunner. Empty array means no gunner position. (Array)
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_vehicleType", "_turrets", "_doorTurrets", "_config"];
|
private ["_vehicle", "_turrets", "_doorTurrets", "_config"];
|
||||||
|
|
||||||
_vehicleType = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turrets = [_vehicleType] call FUNC(getTurrets);
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_doorTurrets = [];
|
_doorTurrets = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicleType;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
|
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Get the turret index of a vehicles commander.
|
* Get the turret index of a vehicles commander.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle type (String)
|
* 0: Vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Turret index of the vehicles commander. Empty array means no observer position. (Array)
|
* Turret index of the vehicles commander. Empty array means no observer position. (Array)
|
||||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_turret = [];
|
_turret = [];
|
||||||
{
|
{
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Get the turret index of a vehicles copilot.
|
* Get the turret index of a vehicles copilot.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle type (String)
|
* 0: Vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Turret index of the vehicles gunner. Empty array means no copilot position. (Array)
|
* Turret index of the vehicles gunner. Empty array means no copilot position. (Array)
|
||||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_turret = [];
|
_turret = [];
|
||||||
{
|
{
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Get the turret index of a vehicles gunner.
|
* Get the turret index of a vehicles gunner.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle type (String)
|
* 0: Vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Turret index of the vehicles gunner. Empty array means no gunner position. (Array)
|
* Turret index of the vehicles gunner. Empty array means no gunner position. (Array)
|
||||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_turret = [];
|
_turret = [];
|
||||||
{
|
{
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ _vehicle = vehicle _unit;
|
|||||||
|
|
||||||
if (_unit == _vehicle) exitWith {[]};
|
if (_unit == _vehicle) exitWith {[]};
|
||||||
|
|
||||||
//_turrets = [typeOf _vehicle] call FUNC(getTurrets);
|
|
||||||
_turrets = allTurrets [_vehicle, true];
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_units = [];
|
_units = [];
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Get the turret indices of ffv turrets.
|
* Get the turret indices of ffv turrets.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle type (String)
|
* 0: Vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Turret index of the vehicles gunner. Empty array means no ffv turrets. (Array)
|
* Turret index of the vehicles gunner. Empty array means no ffv turrets. (Array)
|
||||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_turret = [];
|
_turret = [];
|
||||||
{
|
{
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Get the turret indices of other turrets (not gunner, commander, copilot or ffv).
|
* Get the turret indices of other turrets (not gunner, commander, copilot or ffv).
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Vehicle type (String)
|
* 0: Vehicle (Object)
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Turret index of the vehicles gunner. Empty array means no other turrets. (Array)
|
* Turret index of the vehicles gunner. Empty array means no other turrets. (Array)
|
||||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
_turrets = allTurrets [_vehicle, true];
|
||||||
|
|
||||||
_turret = [];
|
_turret = [];
|
||||||
{
|
{
|
||||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||||
|
|
||||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user