Added handling of captivity when dragging/carrying (#9284)

This commit is contained in:
johnb432 2023-07-23 06:49:08 +02:00 committed by GitHub
parent 1011b963bc
commit f070e3ff30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,16 @@ if (isServer) then {
_unit call FUNC(handleKilled); _unit call FUNC(handleKilled);
}]; }];
// Handle surrending and handcuffing
["ace_captiveStatusChanged", {
params ["_unit", "_state"];
// If surrended or handcuffed, drop dragged/carried object
if (_state) then {
_unit call FUNC(handleKilled);
};
}] call CBA_fnc_addEventHandler;
}; };
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
@ -74,8 +84,6 @@ if (isNil QGVAR(maxWeightCarryRun)) then {
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
//@todo Captivity?
//Add Keybind: //Add Keybind:
["ACE3 Common", QGVAR(drag), (localize LSTRING(DragKeybind)), { ["ACE3 Common", QGVAR(drag), (localize LSTRING(DragKeybind)), {
if (!alive ACE_player) exitWith {false}; if (!alive ACE_player) exitWith {false};