Medical - Unlock air controls when going uncon (#7533)

* Medical - Unlock air controlls when going uncon

* remove unneeded parentheses

* Update addons/medical_status/functions/fnc_setUnconsciousState.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
This commit is contained in:
PabstMirror 2020-02-19 10:05:05 -06:00 committed by GitHub
parent e0d4583be9
commit c44360bd19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,12 @@ if (_active) then {
closeDialog 0;
};
};
// Unlock controls for copilot if unit is pilot of aircraft
if (vehicle _unit isKindOf "Air" && {_unit == driver vehicle _unit}) then {
TRACE_1("pilot of air vehicle - unlocking controls",vehicle _unit);
// Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions
_unit action ["UnlockVehicleControl", vehicle _unit];
};
} else {
// Unit has woken up, no longer need to track this
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil];