mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
d6c39e661f
* Medical StateMachine - Tweak dead state handling - Don't call setDammage inside HandleDamage EH - Add death reason on entering death state * add a getVar disable in case this causes problems * Cleanup * cleanup * Update addons/medical_statemachine/functions/fnc_enteredStateDeath.sqf Co-Authored-By: Ferran Obon <magnetar5891@gmail.com>
28 lines
764 B
Plaintext
28 lines
764 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: SilentSpike
|
|
* 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) exitWith {};
|
|
|
|
//IGNORE_PRIVATE_WARNING ["_thisOrigin", "_thisTransition"]; // vars provided by CBA_statemachine
|
|
TRACE_3("enteredStateDeath",_this,_thisOrigin,_thisTransition);
|
|
|
|
private _causeOfDeath = format ["%1:%2", _thisOrigin, _thisTransition];
|
|
|
|
// could delay a frame here to fix the double killed EH, but we lose it being a "native" kill (scoreboard / rating)
|
|
[_unit, _causeOfDeath] call EFUNC(medical_status,setDead);
|