From cd41594a60344c823d9643f60a72cedc0ed4c565 Mon Sep 17 00:00:00 2001 From: Ellis Nielsen Date: Mon, 1 May 2023 12:39:22 -0500 Subject: [PATCH] Towing - Add CBA event for towing start and cancel (#9178) Co-authored-by: commy2 Co-authored-by: PabstMirror --- addons/towing/functions/fnc_startTow.sqf | 1 + addons/towing/functions/fnc_towStateMachinePFH.sqf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/towing/functions/fnc_startTow.sqf b/addons/towing/functions/fnc_startTow.sqf index 7422674c6a..18955ae397 100644 --- a/addons/towing/functions/fnc_startTow.sqf +++ b/addons/towing/functions/fnc_startTow.sqf @@ -31,4 +31,5 @@ _unit removeItem _ropeClass; GVAR(cancel) = false; GVAR(canAttach) = false; [LINKFUNC(towStateMachinePFH), 0, [TOW_STATE_ATTACH_PARENT, _unit, _target, objNull, _ropeLength, _ropeClass]] call CBA_fnc_addPerFrameHandler; +[QGVAR(ropeDeployed), [_unit, _target, _ropeClass]] call CBA_fnc_localEvent; diff --git a/addons/towing/functions/fnc_towStateMachinePFH.sqf b/addons/towing/functions/fnc_towStateMachinePFH.sqf index 40c21bc899..fb11cadd75 100644 --- a/addons/towing/functions/fnc_towStateMachinePFH.sqf +++ b/addons/towing/functions/fnc_towStateMachinePFH.sqf @@ -140,7 +140,7 @@ switch (_state) do { [_unit, _ropeClass, true] call CBA_fnc_addItem; _args set [0, TOW_STATE_CLEANUP]; GVAR(cancel) = false; - + [QGVAR(ropeDeployCanceled), [_unit, _ropeClass]] call CBA_fnc_localEvent; (localize LSTRING(canceled)) call CBA_fnc_notify; }; case TOW_STATE_CLEANUP: {