MissleGuidance - Move PARAMS up to top

This commit is contained in:
PabstMirror 2015-07-03 21:06:13 -05:00
parent 909fbb5dc4
commit ab2ebf5fcf

View File

@ -1,20 +1,21 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
// Bail if guidance is disabled
// Bail on locality of the projectile, it should be local to us
if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false };
//Bail if shooter isn't player AND system not enabled for AI:
if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false };
private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"];
private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"];
PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
// Bail on not missile
if(! (_ammo isKindOf "MissileBase") ) exitWith { false };
private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"];
private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"];
//Verify ammo has explicity added guidance config (ignore inheritances)
_configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false];
if( (count _configs) < 1) exitWith {};