ACE3/addons/missileguidance/functions/fnc_line_onFired.sqf

37 lines
845 B
Plaintext
Raw Normal View History

2021-04-21 00:11:44 +00:00
#include "script_component.hpp"
/*
* Author: Brandon (TCVM)
* 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
};
private _navigationParams = [
2021-05-02 05:04:08 +00:00
_p, _i, _d,
0,
0,
_correctionDistance
];
_navigationParams
2021-04-21 00:11:44 +00:00