From 5b1491278dd7ddcda645e9b09b181f9530547669 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:29:56 +0200 Subject: [PATCH] Dragging - Fix for #9385 (#9387) --- addons/dragging/XEH_postInit.sqf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/addons/dragging/XEH_postInit.sqf b/addons/dragging/XEH_postInit.sqf index a07274f838..accdd50e4e 100644 --- a/addons/dragging/XEH_postInit.sqf +++ b/addons/dragging/XEH_postInit.sqf @@ -1,14 +1,9 @@ // by PabstMirror, commy2 #include "script_component.hpp" -// Release object on disconnection. Function is identical to killed if (isServer) then { - // 'HandleDisconnect' EH triggers too late - addMissionEventHandler ["PlayerDisconnected", { - private _unit = (getUserInfo (_this select 5)) select 10; - - _unit call FUNC(handleKilled); - }]; + // Release object on disconnection. Function is identical to killed + addMissionEventHandler ["HandleDisconnect", LINKFUNC(handleKilled)]; // Handle surrending and handcuffing ["ace_captiveStatusChanged", {