ACE3/addons/medical_statemachine/functions/fnc_leftStateCardiacArrest.sqf
SilentSpike 24846e6f74
Make state change status updates consistent (#6538)
State transitions call respective functions in the status component where unit variables and status are actually handled.
2018-08-25 16:40:22 +01:00

25 lines
562 B
Plaintext

#include "script_component.hpp"
/*
* Author: RedBery
* Handles a unit leaving cardiac arrest (calls for a status update).
* Clears countdown timer variables.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
params ["_unit"];
_unit setVariable [QGVAR(cardiacArrestTime), nil];
_unit setVariable [QEGVAR(medical,cardiacArrestStart), nil];
// Temporary fix for vitals loop on cardiac arrest exit
_unit setVariable [QGVAR(lastTimeUpdated), CBA_missionTime];
[_unit, false] call EFUNC(medical_status,setCardiacArrest);