ACE3/addons/medical_damage/XEH_preInit.sqf

36 lines
1.0 KiB
Plaintext
Raw Normal View History

#include "script_component.hpp"
ADDON = false;
2017-03-18 19:03:30 +00:00
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
2017-03-18 19:03:30 +00:00
PREP_RECOMPILE_END;
2019-03-24 05:37:39 +00:00
#include "initSettings.sqf"
call FUNC(parseConfigForInjuries);
2017-03-18 14:13:08 +00:00
addMissionEventHandler ["Loaded",{
INFO("Mission Loaded - Reloading medical configs for extension");
// Reload configs into extension (handle full game restart)
call FUNC(parseConfigForInjuries);
}];
// decide which woundsHandler to use by whether the extension is present or not
// if ("ace_medical" callExtension "version" != "") then {
// DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandler);
// } else {
2020-04-22 15:05:22 +00:00
// INFO("Using woundsHandlerSQF");
2017-04-26 15:16:09 +00:00
DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandlerSQF);
// };
[QEGVAR(medical,woundReceived), {
params ["_unit", "_woundedHitPoint", "_receivedDamage", "", "_ammo", "_damageSelectionArray"];
private _typeOfDamage = _ammo call FUNC(getTypeOfDamage);
[_unit, _woundedHitPoint, _receivedDamage, _typeOfDamage, _damageSelectionArray] call FUNC(woundsHandlerActive);
}] call CBA_fnc_addEventHandler;
ADDON = true;