mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
b489750d5b
* Optimizations with private, params, and isEqualType * Fixed tab being used instead of space * Fixed tabs inserted by notepad++ * More usage of new private syntax and params - changed a few checks for an array being empty to `_arr isEqualTo []` rather than `count _arr == 0` - added more uses of `private` on the same line as the variable is declared - added more uses of params to assign variables passed as parameters - removed unnecessary parentheses - removed several unnecessary variable declarations with private array syntax * clean up and formatting
31 lines
1021 B
Plaintext
31 lines
1021 B
Plaintext
//#define DEBUG_MODE_FULL
|
|
#include "script_component.hpp"
|
|
|
|
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
|
private ["_seekerProfilePos", "_i", "_launchParams", "_seekerType", "_seekerTypeName", "_seekerTypesCfg", "_testName", "_testProfile"];
|
|
|
|
_launchParams = ((_this select 1) select 1);
|
|
_seekerTypeName = _launchParams select 2;
|
|
|
|
TRACE_1("Seeker type", _seekerTypeName);
|
|
|
|
_seekerTypesCfg = ( configFile >> QGVAR(SeekerTypes) );
|
|
|
|
_seekerType = nil;
|
|
for [{_i = 0}, {_i< (count _seekerTypesCfg) }, {_i=_i + 1}] do {
|
|
_testProfile = _seekerTypesCfg select _i;
|
|
_testName = configName _testProfile;
|
|
TRACE_3("", _testName, _testProfile, _seekerTypesCfg);
|
|
|
|
if( _testName == _seekerTypeName) exitWith {
|
|
_seekerType = _seekerTypesCfg select _i;
|
|
};
|
|
};
|
|
|
|
_seekerProfilePos = [0, 0, 0];
|
|
if(!isNil "_seekerType") then {
|
|
_seekerProfilePos = _this call (missionNamespace getVariable (getText (_seekerType >> "functionName")));
|
|
};
|
|
|
|
_seekerProfilePos;
|