mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
c28a3d6cdf
* Kill Tracker - Add setting to show kills from vehicle to crew * Update addons/killtracker/XEH_postInit.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: kymckay
|
|
* Handles a unit reaching the point of death (calls for a status update).
|
|
*
|
|
* Arguments:
|
|
* 0: The Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [player] call ace_medical_statemachine_fnc_enteredStateDeath
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit"];
|
|
if (isNull _unit || {!isNil {_unit getVariable QEGVAR(medical,causeOfDeath)}}) exitWith {
|
|
if ((_unit getVariable [QEGVAR(medical,causeOfDeath), ""]) == "#scripted") exitWith {};
|
|
WARNING_1("enteredStateDeath: State transition on dead or null unit - %1",_unit);
|
|
};
|
|
|
|
//IGNORE_PRIVATE_WARNING ["_thisOrigin", "_thisTransition"]; // vars provided by CBA_statemachine
|
|
TRACE_4("enteredStateDeath",_this,_thisOrigin,_thisTransition,CBA_missionTime);
|
|
|
|
private _causeOfDeath = format ["%1:%2", _thisOrigin, _thisTransition];
|
|
private _source = _unit getVariable [QEGVAR(medical,lastDamageSource), objNull];
|
|
private _instigator = _unit getVariable [QEGVAR(medical,lastInstigator), objNull];
|
|
|
|
[_unit, _causeOfDeath, _source, _instigator] call EFUNC(medical_status,setDead);
|