2016-06-30 15:33:29 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
ADDON = false;
|
|
|
|
|
2017-03-18 19:03:30 +00:00
|
|
|
PREP_RECOMPILE_START;
|
2016-06-30 15:33:29 +00:00
|
|
|
#include "XEH_PREP.hpp"
|
2017-03-18 19:03:30 +00:00
|
|
|
PREP_RECOMPILE_END;
|
2016-06-30 15:33:29 +00:00
|
|
|
|
2019-03-24 05:37:39 +00:00
|
|
|
#include "initSettings.sqf"
|
|
|
|
|
2016-09-26 18:25:14 +00:00
|
|
|
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);
|
|
|
|
}];
|
|
|
|
|
2018-07-15 14:24:04 +00:00
|
|
|
// decide which woundsHandler to use by whether the extension is present or not
|
2019-05-12 04:13:59 +00:00
|
|
|
// if ("ace_medical" callExtension "version" != "") then {
|
|
|
|
|
|
|
|
// DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandler);
|
|
|
|
// } else {
|
|
|
|
INFO("Using woundsHandlerSQF");
|
2017-04-26 15:16:09 +00:00
|
|
|
DFUNC(woundsHandlerActive) = LINKFUNC(woundsHandlerSQF);
|
2019-05-12 04:13:59 +00:00
|
|
|
// };
|
2016-12-06 09:59:29 +00:00
|
|
|
|
2018-07-15 14:24:04 +00:00
|
|
|
[QEGVAR(medical,woundReceived), {
|
2019-10-08 15:44:49 +00:00
|
|
|
params ["_unit", "_woundedHitPoint", "_receivedDamage", "", "_ammo", "_damageSelectionArray"];
|
2016-08-27 07:39:24 +00:00
|
|
|
|
|
|
|
private _typeOfDamage = _ammo call FUNC(getTypeOfDamage);
|
2019-10-08 15:44:49 +00:00
|
|
|
[_unit, _woundedHitPoint, _receivedDamage, _typeOfDamage, _damageSelectionArray] call FUNC(woundsHandlerActive);
|
2016-08-27 07:39:24 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|
2016-06-30 15:33:29 +00:00
|
|
|
|
|
|
|
ADDON = true;
|