Medical - Prevent uncon AI from talking (#9776)

This commit is contained in:
Grim 2024-02-07 12:56:24 -03:00 committed by GitHub
parent 8731bcc8b5
commit ae532c72f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,9 +57,19 @@ if (_active) then {
// Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions // Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions
_unit action ["UnlockVehicleControl", vehicle _unit]; _unit action ["UnlockVehicleControl", vehicle _unit];
}; };
// Disable AI talking (yes, this needs to be explicit)
if (!isPlayer _unit && {_unit checkAIFeature "RADIOPROTOCOL"}) then {
_unit disableAI "RADIOPROTOCOL";
_unit setVariable [QGVAR(reenableRadioProtocol), true, true];
};
} else { } else {
// Unit has woken up, no longer need to track this // Unit has woken up, no longer need to track this
_unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil]; _unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil];
if (_unit getVariable [QGVAR(reenableRadioProtocol), false]) then {
_unit enableAI "RADIOPROTOCOL";
};
}; };
// This event doesn't correspond to unconscious in statemachine // This event doesn't correspond to unconscious in statemachine