Common - switch getTurretConfigPath to use cba func (#9180)

This commit is contained in:
PabstMirror 2023-04-14 17:42:57 -05:00 committed by GitHub
parent 1bf3d5086c
commit b78f8684b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,27 +16,4 @@
* Public: Yes
*/
params ["_config", "_turretIndex"];
for "_index" from 0 to (count _turretIndex - 1) do {
_config = _config >> "Turrets";
private _offset = 0;
private _config2 = _config select 0;
private _foundClasses = 0;
for "_a" from 0 to (count _config - 1) do {
if (isClass _config2) then {
_foundClasses = _foundClasses + 1;
} else {
_offset = _offset + 1;
};
_config2 = _config select (_turretIndex select _index) + _offset;
if (_foundClasses == _turretIndex select _index) exitWith {};
};
_config = _config2;
};
_config
call CBA_fnc_getTurret