mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Rerun set func when respawn into captive unit
This commit is contained in:
parent
d4d0a0a6de
commit
14cbceef97
@ -20,5 +20,20 @@ PARAMS_2(_unit,_dead);
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
//With respawn="group", we could be respawning into a unit that is handcuffed/captive
|
||||
//If they are, reset and rerun the SET function
|
||||
//if not, make sure to explicity disable the setCaptivityStatus, because captiveNum does not work correctly on respawn
|
||||
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false];
|
||||
[_unit, true] call FUNC(setHandcuffed);
|
||||
} else {
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
};
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
_unit setVariable [QGVAR(isSurrendering), false];
|
||||
[_unit, true] call FUNC(setSurrendered);
|
||||
} else {
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user