Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missile Guidance - Allow attackProfiles to return [0,0,0] #10352

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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