ACE3/addons/medical_damage/XEH_preInit.sqf
2016-09-18 22:58:56 +02:00

18 lines
636 B
Plaintext

#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
[QEGVAR(medical_engine,woundReceived), {
params ["_unit", "_woundedHitPoint", "_receivedDamage", "", "_ammo"];
// private _selectionName = EGVAR(medical,SELECTIONS) select (EGVAR(medical,HITPOINTS) find _woundedHitPoint); // @todo
private _typeOfDamage = _ammo call FUNC(getTypeOfDamage);
[_unit, _woundedHitPoint, _receivedDamage, _ammo, _typeOfDamage] call FUNC(woundsHandler); // TODO also support the sqf variant
[_unit, EGVAR(medical,STATE_MACHINE)] call EFUNC(medical,addStateHandler);
}] call CBA_fnc_addEventHandler;
ADDON = true;