diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index 5fca3af81c..4003c2a51f 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -4,7 +4,7 @@ * Get the commander config of a vehicles turret. * * Argument: - * 0: vehicle type (String) + * 0: vehicle (Object) * * Return value: * Commander config (Config) @@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"]; _vehicle = _this select 0; -_config = configFile >> "CfgVehicles" >> _vehicle; +_config = configFile >> "CfgVehicles" >> typeOf _vehicle; _turret = [_vehicle] call FUNC(getTurretCommander); [_config, _turret] call FUNC(getTurretConfigPath) diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index 0c09461a04..80bdfb2cfa 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -4,7 +4,7 @@ * Get the gunner config of a vehicles turret. * * Argument: - * 0: vehicle type (String) + * 0: vehicle (Object) * * Return value: * Gunner config (Config) @@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"]; _vehicle = _this select 0; -_config = configFile >> "CfgVehicles" >> _vehicle; +_config = configFile >> "CfgVehicles" >> typeOf _vehicle; _turret = [_vehicle] call FUNC(getTurretGunner); [_config, _turret] call FUNC(getTurretConfigPath) diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index eadaeb2000..cfa7e0532c 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -4,23 +4,23 @@ * Gets the turret index of door gunners * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret indexes of the door gunner. Empty array means no gunner position. (Array) */ #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 = []; { - _config = configFile >> "CfgVehicles" >> _vehicleType; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then { diff --git a/addons/common/functions/fnc_getTurretCommander.sqf b/addons/common/functions/fnc_getTurretCommander.sqf index 4c2b1139c8..b26060b221 100644 --- a/addons/common/functions/fnc_getTurretCommander.sqf +++ b/addons/common/functions/fnc_getTurretCommander.sqf @@ -4,7 +4,7 @@ * Get the turret index of a vehicles commander. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * 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; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretCopilot.sqf b/addons/common/functions/fnc_getTurretCopilot.sqf index c2a7e81778..9f51f8724c 100644 --- a/addons/common/functions/fnc_getTurretCopilot.sqf +++ b/addons/common/functions/fnc_getTurretCopilot.sqf @@ -4,7 +4,7 @@ * Get the turret index of a vehicles copilot. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * 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; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretGunner.sqf b/addons/common/functions/fnc_getTurretGunner.sqf index fd1134dc83..ba1802c37f 100644 --- a/addons/common/functions/fnc_getTurretGunner.sqf +++ b/addons/common/functions/fnc_getTurretGunner.sqf @@ -4,7 +4,7 @@ * Get the turret index of a vehicles gunner. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * 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; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index fd75d221fd..85d69b6828 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -18,7 +18,6 @@ _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {[]}; -//_turrets = [typeOf _vehicle] call FUNC(getTurrets); _turrets = allTurrets [_vehicle, true]; _units = []; diff --git a/addons/common/functions/fnc_getTurretsFFV.sqf b/addons/common/functions/fnc_getTurretsFFV.sqf index b09dfed027..f915d6c096 100644 --- a/addons/common/functions/fnc_getTurretsFFV.sqf +++ b/addons/common/functions/fnc_getTurretsFFV.sqf @@ -4,7 +4,7 @@ * Get the turret indices of ffv turrets. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * 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; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretsOther.sqf b/addons/common/functions/fnc_getTurretsOther.sqf index 53673b5a8d..102c1a9d1c 100644 --- a/addons/common/functions/fnc_getTurretsOther.sqf +++ b/addons/common/functions/fnc_getTurretsOther.sqf @@ -4,7 +4,7 @@ * Get the turret indices of other turrets (not gunner, commander, copilot or ffv). * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * 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; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath);