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>
27 lines
912 B
Plaintext
27 lines
912 B
Plaintext
#include "script_component.hpp"
|
|
|
|
ADDON = false;
|
|
|
|
PREP_RECOMPILE_START;
|
|
#include "XEH_PREP.hpp"
|
|
PREP_RECOMPILE_END;
|
|
|
|
#include "initSettings.sqf"
|
|
|
|
// Add vanilla killed EH to unit to set correct killer
|
|
["CAManBase", "init", {
|
|
params ["_unit"];
|
|
|
|
private _config = [_unit] call CBA_fnc_getObjectConfig;
|
|
if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);};
|
|
if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)};
|
|
|
|
// Hopefully this EH gets added first as it can only effect other EH called after it
|
|
private _ehIndex = _unit addEventHandler ["Killed", {_this call FUNC(handleKilled)}];
|
|
#ifdef DEBUG_MODE_FULL
|
|
if (_ehIndex != 0) then { WARNING_1("killed EH not first [%1]",_ehIndex); };
|
|
#endif
|
|
}, nil, [IGNORE_BASE_UAVPILOTS], true] call CBA_fnc_addClassEventHandler;
|
|
|
|
ADDON = true;
|