2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-11-07 22:46:10 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Raises the transition to the next state instantly when fatally injured.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
2019-03-30 16:07:54 +00:00
|
|
|
* Example:
|
|
|
|
* [player] call ace_medical_statemachine_fnc_enteredStateFatalInjury
|
|
|
|
*
|
2016-11-07 22:46:10 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
2018-08-02 14:02:10 +00:00
|
|
|
|
2016-11-07 22:46:10 +00:00
|
|
|
params ["_unit"];
|
2022-03-07 18:28:51 +00:00
|
|
|
if (isNull _unit || {!isNil {_unit getVariable QEGVAR(medical,causeOfDeath)}}) exitWith {
|
|
|
|
WARNING_1("enteredStateFatalInjury: State transition on dead or null unit - %1",_unit);
|
|
|
|
};
|
2016-11-07 22:46:10 +00:00
|
|
|
|
2018-07-15 13:00:16 +00:00
|
|
|
[QEGVAR(medical,FatalInjuryInstantTransition), _unit] call CBA_fnc_localEvent;
|