From 7a3029b9fdbdc5ac21cf546ccac5ea0130f9b17f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 6 Feb 2015 03:38:27 -0600 Subject: [PATCH] replace spawns --- addons/captives/CfgEventHandlers.hpp | 2 +- addons/captives/CfgVehicles.hpp | 8 ++-- addons/captives/XEH_postInit.sqf | 32 +++++++++++++ addons/captives/XEH_postInitClient.sqf | 16 ------- .../functions/fnc_canApplyHandcuffs.sqf | 4 +- .../functions/fnc_canEscortCaptive.sqf | 6 +-- .../captives/functions/fnc_canLoadCaptive.sqf | 15 ++++--- .../functions/fnc_canRemoveHandcuffs.sqf | 2 +- .../functions/fnc_doApplyHandcuffs.sqf | 2 +- .../functions/fnc_doEscortCaptive.sqf | 22 +++++---- .../captives/functions/fnc_handleGetOut.sqf | 6 +-- .../captives/functions/fnc_handleKilled.sqf | 4 +- .../functions/fnc_handlePlayerChanged.sqf | 8 ++-- .../functions/fnc_handleUnitInitPost.sqf | 30 ++++++------- .../captives/functions/fnc_setHandcuffed.sqf | 23 +++++----- addons/captives/functions/fnc_surrender.sqf | 45 ++++++++----------- .../functions/fnc_vehicleCaptiveMoveIn.sqf | 2 +- .../functions/fnc_vehicleCaptiveMoveOut.sqf | 2 +- 18 files changed, 123 insertions(+), 106 deletions(-) create mode 100644 addons/captives/XEH_postInit.sqf delete mode 100644 addons/captives/XEH_postInitClient.sqf diff --git a/addons/captives/CfgEventHandlers.hpp b/addons/captives/CfgEventHandlers.hpp index 07dbe45fb7..722750f915 100644 --- a/addons/captives/CfgEventHandlers.hpp +++ b/addons/captives/CfgEventHandlers.hpp @@ -6,7 +6,7 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); + init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 8bd97b0b58..65d574fab0 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -50,7 +50,7 @@ class CfgVehicles { displayName = "$STR_ACE_Captives_LoadCaptive"; distance = 4; condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive)); - statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(loadCaptive)); + statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive)); exceptions[] = {QGVAR(isNotEscorting)}; showDisabled = 0; icon = QUOTE(PATHTOF(UI\captive_ca.paa)); @@ -61,7 +61,7 @@ class CfgVehicles { displayName = "$STR_ACE_Captives_FriskPerson"; distance = 2; condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson)); - statement = QUOTE([ARR_2(_player, _target)] call FUNC(openFriskMenu)); + statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson)); showDisabled = 0; //icon = ""; //@todo priority = 3; @@ -97,7 +97,7 @@ class CfgVehicles { displayName = "$STR_ACE_Captives_LoadCaptive"; \ distance = 4; \ condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \ - statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(loadCaptive)); \ + statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \ exceptions[] = {QGVAR(isNotEscorting)}; \ showDisabled = 0; \ priority = 1.2; \ @@ -107,7 +107,7 @@ class CfgVehicles { displayName = "$STR_ACE_Captives_UnloadCaptive"; \ distance = 4; \ condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \ - statement = QUOTE([ARR_2(_player, _target)] call FUNC(unloadCaptive)); \ + statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \ showDisabled = 0; \ priority = 1.2; \ hotkey = "C"; \ diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf new file mode 100644 index 0000000000..9d1a242d4d --- /dev/null +++ b/addons/captives/XEH_postInit.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" + +["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); +["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler); +["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler); +["SetHandcuffed", {_this call FUNC(setHandcuffed)}] 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 +if (isServer) then { + addMissionEventHandler ["HandleDisconnect", { + PARAMS_1(_disconnectedPlayer); + _escortedUnit = _disconnectedPlayer getVariable [QGVAR(escortedUnit), objNull]; + if ((!isNull _escortedUnit) && {(attachedTo _escortedUnit) == _disconnectedPlayer}) then { + detach _escortedUnit; + systemChat "debug: DC detach"; + }; + if (_disconnectedPlayer getVariable [QGVAR(isEscorting), false]) then { + _disconnectedPlayer setVariable [QGVAR(isEscorting), false, true]; + }; + }]; +}; + +//TODO: Medical Integration Events??? + +// [_unit, "knockedOut", { +// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut}; +// }] call ACE_Core_fnc_addCustomEventhandler; + +// [_unit, "wokeUp", { +// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp}; +// }] call ACE_Core_fnc_addCustomEventhandler; diff --git a/addons/captives/XEH_postInitClient.sqf b/addons/captives/XEH_postInitClient.sqf deleted file mode 100644 index b55c9eb10c..0000000000 --- a/addons/captives/XEH_postInitClient.sqf +++ /dev/null @@ -1,16 +0,0 @@ -#include "script_component.hpp" - -["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); -["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler); -["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler); -["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler); - -//TODO: Medical Integration Events??? - -// [_unit, "knockedOut", { - // if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut}; -// }] call ACE_Core_fnc_addCustomEventhandler; - -// [_unit, "wokeUp", { - // if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp}; -// }] call ACE_Core_fnc_addCustomEventhandler; diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 8a3d143e96..8f503d8fd0 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,6 +20,6 @@ PARAMS_2(_unit,_target); //Player has cableTie, target is alive and not already handcuffed -("ACE_CableTie" in (items _unit)) && -{alive _target} && +("ACE_CableTie" in (items _unit)) && +{alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index 2d2fd5abe4..3d026e3d54 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -20,7 +20,7 @@ PARAMS_2(_unit,_target); //Alive, handcuffed, not being escored, and not unconsious -(_target getVariable [QGVAR(isHandcuffed), false]) && -{isNull (attachedTo _target)} && -{alive _target} && +(_target getVariable [QGVAR(isHandcuffed), false]) && +{isNull (attachedTo _target)} && +{alive _target} && {!(_target getVariable [QGVAR(ACE_isUnconscious), false])} diff --git a/addons/captives/functions/fnc_canLoadCaptive.sqf b/addons/captives/functions/fnc_canLoadCaptive.sqf index 3b1521e2be..902ec36331 100644 --- a/addons/captives/functions/fnc_canLoadCaptive.sqf +++ b/addons/captives/functions/fnc_canLoadCaptive.sqf @@ -4,8 +4,8 @@ * * Arguments: * 0: Unit that wants to load a captive - * 1: A captive. ObjNull for the first escorted captive - * 2: Vehicle to load the captive into. ObjNull for the nearest vehicle + * 1: A captive. ObjNull for the first escorted captive (may be null) + * 2: Vehicle to load the captive into. ObjNull for the nearest vehicle (may be null) * * Return Value: * The return value @@ -24,15 +24,16 @@ PARAMS_3(_unit,_target,_vehicle); if (isNull _target) then { _objects = attachedObjects _unit; _objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter); - _target = _objects select 0; + if ((count _objects) > 0) then {_target = _objects select 0;}; }; if (isNull _vehicle) then { _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship_F"], 10]; - _vehicle = _objects select 0; + if ((count _objects) > 0) then {_vehicle = _objects select 0;}; }; -_unit getVariable [QGVAR(isEscorting), false] -&& {!isNil "_target"} -&& {!isNil "_vehicle"} +(!isNull _target) +&& {!isNull _vehicle} +&& {_unit getVariable [QGVAR(isEscorting), false]} +&& {_target getVariable [QGVAR(isHandcuffed), false]} && {_vehicle emptyPositions "cargo" > 0} diff --git a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf index f36488fbf1..d36042b0ab 100644 --- a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf @@ -19,5 +19,5 @@ PARAMS_2(_unit,_target); //Unit is handcuffed and not currently being escorted -_target getVariable [QGVAR(isHandcuffed), false] && +_target getVariable [QGVAR(isHandcuffed), false] && {isNull (attachedTo _target)} diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index 9ae82916f7..6c44df3dc5 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -18,5 +18,5 @@ PARAMS_2(_unit,_target); -_unit removeItem "ACE_CableTie"; +_unit removeItem "ACE_CableTie"; ["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent); diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index 72a0cd0c6c..fbbcd09947 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -34,21 +34,25 @@ if (_state) then { {[(_this select 0), ((_this select 0) getVariable [QGVAR(escortedUnit), objNull]), false] call FUNC(doEscortCaptive);}, nil, 20, false, true, "", QUOTE(!isNull (GETVAR(_target,QGVAR(escortedUnit),objNull)))]; - [_unit, _target, _actionID] spawn { - PARAMS_3(_unit,_target,_actionID); - - while {_unit getVariable [QGVAR(isEscorting), false]} do { - sleep 0.2; - + private "_escortFnc"; + _escortFnc = { + EXPLODE_3_PVT((_this select 0),_unit,_target,_actionID); + if (_unit getVariable [QGVAR(isEscorting), false]) then { if (!alive _target || {!alive _unit} || {!canStand _target} || {!canStand _unit} || {_target getVariable ["ACE_isUnconscious", false]} || {_unit getVariable ["ACE_isUnconscious", false]} || {!isNull (attachedTo _unit)}) then { _unit setVariable [QGVAR(isEscorting), false, true]; }; }; - [objNull, _target] call EFUNC(common,claim); - detach _target; - _unit removeAction _actionID; + if (!(_unit getVariable [QGVAR(isEscorting), false])) then { + [(_this select 1)] call cba_fnc_removePerFrameHandler; + [objNull, _target] call EFUNC(common,claim); + detach _target; + _unit removeAction _actionID; + _unit setVariable [QGVAR(escortedUnit), objNull, true]; + }; }; + [_escortFnc, 0.2, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler; + } else { _unit setVariable [QGVAR(isEscorting), false, true]; _unit setVariable [QGVAR(escortedUnit), objNull, true]; diff --git a/addons/captives/functions/fnc_handleGetOut.sqf b/addons/captives/functions/fnc_handleGetOut.sqf index 00368532e7..b212377dd2 100644 --- a/addons/captives/functions/fnc_handleGetOut.sqf +++ b/addons/captives/functions/fnc_handleGetOut.sqf @@ -21,9 +21,9 @@ PARAMS_3(_vehicle,_dontcare,_unit); if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then { private ["_cargoIndex"]; - - _cargoIndex = _unit getVariable ["ACE_Captives_CargoIndex", -1]; - + + _cargoIndex = _unit getVariable [QGVAR(CargoIndex), -1]; + //If captive was not "unloaded", then move them back into the vehicle. if (_cargoIndex != -1) exitWith { _unit moveInCargo [_vehicle, _cargoIndex]; diff --git a/addons/captives/functions/fnc_handleKilled.sqf b/addons/captives/functions/fnc_handleKilled.sqf index 5ac2935a2e..219bd2eb60 100644 --- a/addons/captives/functions/fnc_handleKilled.sqf +++ b/addons/captives/functions/fnc_handleKilled.sqf @@ -1,6 +1,6 @@ /* * Author: PabstMirror - * Handles when a unit is kill. Reset captivity and escorting status when getting killed + * Handles when a unit is kill. Reset captivity and escorting status * * Arguments: * 0: _oldUnit @@ -22,5 +22,5 @@ if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then { }; if (_oldUnit getVariable [QGVAR(isEscorting), false]) then { - _oldUnit setVariable [QGVAR(isEscorting), false, true] + _oldUnit setVariable [QGVAR(isEscorting), false, true]; }; diff --git a/addons/captives/functions/fnc_handlePlayerChanged.sqf b/addons/captives/functions/fnc_handlePlayerChanged.sqf index c3e148d6c4..af6472c211 100644 --- a/addons/captives/functions/fnc_handlePlayerChanged.sqf +++ b/addons/captives/functions/fnc_handlePlayerChanged.sqf @@ -1,9 +1,9 @@ /* * Author: commy2 - * TODO + * Handles playerChanged. Resets "showHUD" based on handcuff status * * Arguments: - * 0: _unit + * 0: _newUnit * 1: _oldUnit * * Return Value: @@ -16,9 +16,9 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_oldUnit); +PARAMS_2(_newUnit,_oldUnit); -if (_unit getVariable [QGVAR(isHandcuffed), false]) then { +if (_newUnit getVariable [QGVAR(isHandcuffed), false]) then { showHUD false; } else { showHUD true; diff --git a/addons/captives/functions/fnc_handleUnitInitPost.sqf b/addons/captives/functions/fnc_handleUnitInitPost.sqf index 4450378129..d34eebeb4a 100644 --- a/addons/captives/functions/fnc_handleUnitInitPost.sqf +++ b/addons/captives/functions/fnc_handleUnitInitPost.sqf @@ -1,24 +1,24 @@ /* -* Author: commy2 -* handle captive and unconsciousness state and prevent grenades -* -* Arguments: -* 0: _unit -* -* Return Value: -* The return value -* -* Example: -* TODO -* -* Public: No -*/ + * Author: commy2 + * handle captive and unconsciousness state and prevent grenades + * + * Arguments: + * 0: _unit + * + * Return Value: + * The return value + * + * Example: + * TODO + * + * Public: No + */ #include "script_component.hpp" PARAMS_1(_unit); // prevent players from throwing grenades (added to all units) -[_unit, "Throw", {(_this select 1) getVariable [QGVAR(isHandcuffed), false]}, {}] call EFUNC(common,addActionEventhandler); +[_unit, "Throw", {(_this select 1) getVariable [QGVAR(isHandcuffed), false]}, {hint format ["%1 - debug throw prevented",time];}] call EFUNC(common,addActionEventhandler); if (local _unit) then { // reset status on mission start diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index c28a26909f..98a12168d3 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -29,31 +29,34 @@ if (_state isEqualTo (_unit getVariable [QGVAR(isHandcuffed), false])) exitWith if (_state) then { _unit setVariable [QGVAR(isHandcuffed), true, true]; + [_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus); // fix anim on mission start (should work on dedicated servers) - _unit spawn { - [_this, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus); - if (_this getVariable [QGVAR(isHandcuffed), false] && {vehicle _this == _this}) then { - [_this] call EFUNC(common,fixLoweredRifleAnimation); - [_this, "ACE_AmovPercMstpScapWnonDnon", 0] spawn EFUNC(common,doAnimation); + _fixAnimationFnc = { + PARAMS_1(_unit); + if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then { + [_unit] call EFUNC(common,fixLoweredRifleAnimation); + [_unit, "ACE_AmovPercMstpScapWnonDnon", 0] call EFUNC(common,doAnimation); }; }; - _unit setVariable ["ACE_Captives_CargoIndex", vehicle _unit getCargoIndex _unit, true]; + [_fixAnimationFnc, [_unit], 0.05, 0] call EFUNC(common,waitAndExecute); + + _unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true]; if (_unit == ACE_player) then { showHUD false; }; } else { _unit setVariable [QGVAR(isHandcuffed), false, true]; - [_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus); - if (vehicle _unit == _unit) then { + [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); + if ((vehicle _unit) == _unit) then { [_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); }; - if (_unit getVariable ["ACE_Captives_CargoIndex", -1] != -1) then { - _unit setVariable ["ACE_Captives_CargoIndex", -1, true]; + if (_unit getVariable [QGVAR(CargoIndex), -1] != -1) then { + _unit setVariable [QGVAR(CargoIndex), -1, true]; }; if (_unit == ACE_player) then { diff --git a/addons/captives/functions/fnc_surrender.sqf b/addons/captives/functions/fnc_surrender.sqf index 69098c19a1..7c5adc08de 100644 --- a/addons/captives/functions/fnc_surrender.sqf +++ b/addons/captives/functions/fnc_surrender.sqf @@ -26,38 +26,31 @@ if (_state) then { _unit setVariable [QGVAR(isSurrender), true, true]; [_unit, "ACE_Surrendered", true] call EFUNC(common,setCaptivityStatus); - _unit spawn { - // fix for lowered rifle animation glitch - if (currentWeapon _this != "" && {currentWeapon _this == primaryWeapon _this} && {weaponLowered _this} && {stance _this == "STAND"}) then { - _this playMove "amovpercmstpsraswrfldnon"; - }; - while {_this getVariable [QGVAR(isSurrender), false]} do { - sleep 0.001; //sleep in UI - - if (isPlayer _this) then {showHUD false}; - - if (!alive _this || {_this getVariable ["ACE_isUnconscious", false]}) then { - _this setVariable [QGVAR(isSurrender), false, true]; + private "_surrenderFnc"; + _surrenderFnc = { + EXPLODE_1_PVT((_this select 0),_unit); + if (_unit getVariable [QGVAR(isSurrender), false]) then { + if ((!alive _unit) || {_unit getVariable ["ACE_isUnconscious", false]} || {_unit getVariable [QGVAR(isHandcuffed), false]}) then { + _unit setVariable [QGVAR(isSurrender), false, true]; } else { - _this playMove "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon"; + [_unit, "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon", 0] call EFUNC(common,doAnimation); }; }; - if !(_this getVariable ["ACE_isUnconscious", false]) then { - _this playMoveNow "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"; - } else { - _this playMoveNow "unconscious"; + + if (!(_unit getVariable [QGVAR(isSurrender), false])) then { + [(_this select 1)] call cba_fnc_removePerFrameHandler; + + if !(_unit getVariable ["ACE_isUnconscious", false]) then { + [_unit, "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 1] call EFUNC(common,doAnimation); + } else { + [_unit, "unconscious", 1] call EFUNC(common,doAnimation); + }; + [_unit, "ACE_Surrendered", false] call EFUNC(common,setCaptivityStatus); + if (isPlayer _unit) then {showHUD true}; }; - - [_this, "ACE_Surrendered", false] call EFUNC(common,setCaptivityStatus); - - if (isPlayer _this) then {showHUD true}; }; + [_surrenderFnc, 0.0, [_unit]] call CBA_fnc_addPerFrameHandler; } else { _unit setVariable [QGVAR(isSurrender), false, true]; }; - -/* -player playMove "AmovPercMstpSsurWnonDnon" -player switchMove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon" - */ diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf index fe4d0528c6..dd3b6e6818 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf @@ -23,6 +23,6 @@ private ["_cargoIndex"]; _target moveInCargo _vehicle; _target assignAsCargo _vehicle; _cargoIndex = _vehicle getCargoIndex _target; -_target setVariable ["ACE_Captives_CargoIndex", _cargoIndex, true]; +_target setVariable [QGVAR(CargoIndex), _cargoIndex, true]; TRACE_3("moveinEH",_target,_vehicle,_cargoIndex); diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf index 0a10572909..4210e8da15 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf @@ -17,7 +17,7 @@ PARAMS_1(_unit); -_unit setVariable ["ACE_Captives_CargoIndex", -1, true]; +_unit setVariable [QGVAR(CargoIndex), -1, true]; moveOut _unit; [_unit, "ACE_AmovPercMstpScapWnonDnon", 2] call EFUNC(common,doAnimation);