From 4826a89ef5397a92c628eedd8f7a86ad478503ba Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 4 Mar 2016 11:45:38 -0600 Subject: [PATCH] Fix captivity system on dedicated Fix #3532 --- addons/captives/XEH_postInit.sqf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index 144d3efb9a3..5aada0950f6 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -1,5 +1,11 @@ #include "script_component.hpp" +["SettingsInitialized", { + // Hold on a little bit longer to ensure anims will work + [{ + GVAR(captivityEnabled) = true; + }, [], 0.05] call EFUNC(common,waitAndExecute); +}] call EFUNC(common,addEventHandler); //Handles when someone starts escorting and then disconnects, leaving the captive attached //This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC @@ -33,10 +39,3 @@ if (!hasInterface) exitWith {}; ["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition); ["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition); ["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition); - -["SettingsInitialized", { - // Hold on a little bit longer to ensure anims will work - [{ - GVAR(captivityEnabled) = true; - }, [], 0.05] call EFUNC(common,waitAndExecute); -}] call EFUNC(common,addEventHandler);