ACE3/addons/missileguidance/functions/fnc_proNav_onFired.sqf

37 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-10-07 00:45:05 +00:00
#include "..\script_component.hpp"
2021-04-10 19:11:20 +00:00
/*
2023-09-09 16:30:39 +00:00
* Author: tcvm
2021-04-10 19:11:20 +00:00
* Sets up proportional navigation state arrays (called from missileGuidance's onFired).
*
* Arguments:
* Guidance Arg Array <ARRAY>
*
* Return Value:
* None
*
* Example:
* [] call ace_missileguidance_fnc_proNav_onFired
*
* Public: No
*/
params ["_firedEH", "", "", "", "_stateParams"];
_firedEH params ["_shooter","","","","_ammo","","_projectile"];
_launchParams params ["_shooter","_targetLaunchParams","_seekerType","_attackProfile","_lockMode","_laserInfo","_navigationType"];
_targetLaunchParams params ["_target", "_targetPos", "_launchPos"];
_stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState"];
2021-04-10 19:11:20 +00:00
_seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"];
private _ammoConfig = configOf _projectile;
private _navigationGain = getNumber (_ammoConfig >> QUOTE(ADDON) >> "navigationGain");
if (_navigationGain == 0) then {
2021-05-02 05:04:08 +00:00
_navigationGain = 3;
};
2021-04-10 19:11:20 +00:00
private _navigationParams = [
2021-05-02 05:04:08 +00:00
[ // Last Missile Frame
[0, 0, 0] // Last line of sight
],
_navigationGain // navigation gain of missile. Set in the navigation onFired function
2021-04-10 19:11:20 +00:00
];
_navigationParams