Skip to content

Commit

Permalink
Missile Guidance - Allow attackProfiles to return [0,0,0] (#10352)
Browse files Browse the repository at this point in the history
* Missile Guidance - Allow attackProfiles to return [0,0,0]

* Update fnc_doAttackProfile.sqf
  • Loading branch information
PabstMirror authored Oct 3, 2024
1 parent f84ff88 commit 17ece8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/missileguidance/functions/fnc_doAttackProfile.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private _attackProfileFunction = getText (configFile >> QGVAR(AttackProfiles) >>
private _attackProfilePos = _this call (missionNamespace getVariable _attackProfileFunction);

if ((isNil "_attackProfilePos") || {_attackProfilePos isEqualTo [0,0,0]}) exitWith {
ERROR_2("attack profile [%1] returned bad pos %2",_attackProfileName,_attackProfilePos);
// ERROR_2("attack profile [%1] returned bad pos %2",_attackProfileName,_attackProfilePos);
[0,0,0]
};

Expand Down
2 changes: 1 addition & 1 deletion addons/missileguidance/functions/fnc_guidancePFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ _targetData set [1, _projectilePos vectorFromTo _profileAdjustedTargetPos];

// If we have no seeker target, then do not change anything
// If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection
if ((_pitchRate != 0 || {_yawRate != 0})) then {
if ((_pitchRate != 0 || {_yawRate != 0}) && {_profileAdjustedTargetPos isNotEqualTo [0,0,0]}) then {
private _navigationFunction = getText (configFile >> QGVAR(NavigationTypes) >> _navigationType >> "functionName");
if (_navigationStateData isNotEqualTo []) then {
(_navigationStateData select _currentState) params ["_transitionCondition"];
Expand Down

0 comments on commit 17ece8e

Please sign in to comment.