diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index e149a35b2f..91dbeb9e6d 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -54,8 +54,8 @@ class CfgAmmo { seekerMaxRange = 2500; // Range from the missile which the seeker can visually search // Attack profile type selection - defaultAttackProfile = "LIN"; - attackProfiles[] = { "LIN", "DIR", "MID", "HI", "TOP" }; + defaultAttackProfile = "PYM"; + attackProfiles[] = { "LIN", "DIR", "MID", "HI", "TOP", "PYM" }; }; }; diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index 34dd2eb9c9..a62776bfc2 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -18,7 +18,7 @@ PREP(attackProfile_DIR); PREP(attackProfile_MID); PREP(attackProfile_HI); PREP(attackProfile_TOP); - +PREP(attackprofile_PYM); // Seeker search functions PREP(seekerType_SALH); \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index 375f65810c..6a05b8644b 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -13,8 +13,8 @@ _targetLaunchParams = _launchParams select 1; _shooterPos = getPosASL _shooter; _projectilePos = getPosASL _projectile; -_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -_distanceToShooter = _projectilePos vectorDistance _shooterPos; +_distanceToTarget = _projectilePos distance _seekerTargetPos; +_distanceToShooter = _projectilePos distance _shooterPos; _addHeight = [0,0,(_projectilePos distance _seekerTargetPos)*0.02]; diff --git a/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf b/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf index db8c552f25..6241e93a04 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_PYM.sqf @@ -13,10 +13,14 @@ _targetLaunchParams = _launchParams select 1; _shooterPos = getPosASL _shooter; _projectilePos = getPosASL _projectile; -_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos; -_distanceToShooter = _projectilePos vectorDistance _shooterPos; +_distanceToTarget = _projectilePos distance _seekerTargetPos; +_distanceToShooter = _projectilePos distance _shooterPos; -_addHeight = [0,0,_distanceToTarget]; +TRACE_2("", _distanceToTarget, _distanceToShooter); + +_addHeight = [0,0,(_projectilePos distance _seekerTargetPos)*0.02]; + +TRACE_1("", _addHeight); _seekerTargetPos = _seekerTargetPos vectorAdd _addHeight; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index 1ed14fa21f..fa7c6f4f8b 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -1,4 +1,4 @@ -#define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index 6502dd724b..1e43d83218 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -1,4 +1,4 @@ -#define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); diff --git a/addons/missileguidance/functions/fnc_fired.sqf b/addons/missileguidance/functions/fnc_fired.sqf index a8f552c48f..f8729418c4 100644 --- a/addons/missileguidance/functions/fnc_fired.sqf +++ b/addons/missileguidance/functions/fnc_fired.sqf @@ -20,6 +20,7 @@ if(isNil "_enabled" || {_enabled != 1}) exitWith { false }; _target = _shooter getVariable[QGVAR(target), nil]; _seekerType = _shooter getVariable [QGVAR(seekerType), nil]; _attackProfile = _shooter getVariable [QGVAR(attackProfile), nil]; +TRACE_3("Begin guidance", _target, _seekerType, _attackProfile); if ( isNil "_seekerType" || { ! ( _seekerType in (getArray (_config >> "seekerTypes" ) ) ) } ) then { _seekerType = getText (_config >> "defaultSeekerType"); diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 8494fab49d..7f260631b8 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -1,4 +1,4 @@ -#define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL #include "script_component.hpp" private["_args", "_launchParams", "_targetLaunchParams", "_config", "_flightParams", "_seekerParams"];