diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 75b1a85803..47bd557efc 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -81,7 +81,7 @@ class CfgVehicles { }; class ACE_StartSurrenderingSelf { displayName = "$STR_ACE_Captives_StartSurrendering"; - condition = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered)); + condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender)); statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered)); exceptions[] = {}; showDisabled = 0; diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index da92307815..ac86d71915 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -3,6 +3,7 @@ //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 + if (isServer) then { addMissionEventHandler ["HandleDisconnect", { PARAMS_1(_disconnectedPlayer); diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index 728f5fff69..d23d8759f8 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -22,8 +22,8 @@ PREP(handleKnockedOut); PREP(handlePlayerChanged); PREP(handleUnitInitPost); PREP(handleVehicleChanged); -PREP(handleZeusDisplayChanged); PREP(handleWokeUp); +PREP(handleZeusDisplayChanged); PREP(moduleSurrender); PREP(setHandcuffed); PREP(setSurrendered); diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index d2e3fc9f5e..a33c56fc09 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -29,13 +29,13 @@ if (local _logic) then { if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then { systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)]; [_mouseOverObject, true] call FUNC(setSurrendered); - - if (!(_mouseOverObject getVariable [GVAR(), false])) then { + + if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then { ["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent); } else { ["SetSurrendered", [_mouseOverObject], [_mouseOverObject, false]] call EFUNC(common,targetEvent); }; - + } else { systemChat format ["Only use on dismounted inf"]; };