Skip to content

Commit

Permalink
Medical - Unlock air controls when going uncon (#7533)
Browse files Browse the repository at this point in the history
* Medical - Unlock air controlls when going uncon

* remove unneeded parentheses

* Update addons/medical_status/functions/fnc_setUnconsciousState.sqf

Co-Authored-By: mharis001 <[email protected]>

Co-authored-by: mharis001 <[email protected]>
  • Loading branch information
PabstMirror and mharis001 authored Feb 19, 2020
1 parent e0d4583 commit c44360b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addons/medical_status/functions/fnc_setUnconsciousState.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit c44360b

Please sign in to comment.