From 2fe7122b3e4d58c4de479b83e65b214b810fe8d2 Mon Sep 17 00:00:00 2001 From: jaynus Date: Sat, 18 Apr 2015 15:44:07 -0700 Subject: [PATCH] Disable handoff until completed. --- .../functions/fnc_handleHandoff.sqf | 2 +- .../missileguidance/functions/fnc_onFired.sqf | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/addons/missileguidance/functions/fnc_handleHandoff.sqf b/addons/missileguidance/functions/fnc_handleHandoff.sqf index 2f1dfac8e7..07a0e116b3 100644 --- a/addons/missileguidance/functions/fnc_handleHandoff.sqf +++ b/addons/missileguidance/functions/fnc_handleHandoff.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" PARAMS_2(_target,_args); -if(!local _target) exitWith {}; +if(isNil "_target" || { objNull _target} || {!local _target} ) exitWith { false }; [FUNC(guidancePFH), 0, _args] call cba_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index 071b2bbf99..7ada1d4442 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -86,13 +86,20 @@ _args = [_this, // Laser code needs to give us a shooter for LOBL, or the seeker unit needs to be able to shift locality // Based on its homing laser // Lasers need to be handled in a special LOAL/LOBL case -_guidingUnit = ACE_player; -if(local _guidingUnit) then { +//if(isPlayer _shooter) then { +// _guidingUnit = ACE_player; +// +// if(local _guidingUnit) then { +// [FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler; +// } else { +// [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff); +// }; +//} else { [FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler; -} else { - [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff); -}; +//}; + + /* Clears locking settings (vehicle _shooter) setVariable [QGVAR(target), nil]; (vehicle _shooter) setVariable [QGVAR(seekerType), nil];