2023-10-07 00:45:05 +00:00
|
|
|
#include "..\script_component.hpp"
|
2021-04-21 00:11:44 +00:00
|
|
|
/*
|
2023-09-09 16:30:39 +00:00
|
|
|
* Author: tcvm
|
2021-04-21 00:11:44 +00:00
|
|
|
* Sets up line state arrays (called from missileGuidance's onFired).
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* Guidance Arg Array <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_missileguidance_fnc_line_onFired
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
params ["_firedEH", "", "", "", "_stateParams"];
|
|
|
|
_firedEH params ["","","","","","","_projectile"];
|
|
|
|
|
|
|
|
private _ammoConfig = configOf _projectile;
|
|
|
|
private _p = getNumber (_ammoConfig >> QUOTE(ADDON) >> "lineGainP");
|
|
|
|
private _d = getNumber (_ammoConfig >> QUOTE(ADDON) >> "lineGainD");
|
|
|
|
private _correctionDistance = getNumber (_ammoConfig >> QUOTE(ADDON) >> "correctionDistance");
|
|
|
|
|
2021-04-21 06:52:55 +00:00
|
|
|
if (_correctionDistance == 0) then {
|
2021-05-02 05:04:08 +00:00
|
|
|
_correctionDistance = 1;
|
2021-04-21 06:52:55 +00:00
|
|
|
};
|
|
|
|
|
2021-05-02 02:55:26 +00:00
|
|
|
private _navigationParams = [
|
2022-06-03 02:11:35 +00:00
|
|
|
_p, 0, _d,
|
2021-05-02 05:04:08 +00:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
_correctionDistance
|
2021-05-02 02:55:26 +00:00
|
|
|
];
|
|
|
|
_navigationParams
|