2018-07-29 22:07:30 +00:00
|
|
|
// #define DEBUG_MODE_FULL
|
2016-07-02 14:34:28 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
["CBA_settingsInitialized", {
|
|
|
|
if !(GETEGVAR(medical,enabled,false)) exitWith {};
|
2019-04-16 21:47:13 +00:00
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
[QEGVAR(medical,setUnconscious), LINKFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
|
2016-10-06 22:09:58 +00:00
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
2023-09-02 22:09:19 +00:00
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
// Fractures affect base sway, pain makes it worse
|
|
|
|
["baseline", {
|
|
|
|
ACE_player getVariable [QEGVAR(medical_engine,aimFracture), 0]
|
|
|
|
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
|
2016-11-07 21:19:55 +00:00
|
|
|
|
2024-07-17 19:49:23 +00:00
|
|
|
// Max pain = 5x sway
|
|
|
|
["multiplier", {
|
|
|
|
1 + (GET_PAIN_PERCEIVED(ACE_player) * 4)
|
|
|
|
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
|
|
|
|
|
|
|
|
#ifdef DEBUG_MODE_FULL
|
|
|
|
call compile preprocessFileLineNumbers QPATHTOF(dev\reportSettings.sqf);
|
|
|
|
call compile preprocessFileLineNumbers QPATHTOF(dev\watchVariable.sqf);
|
|
|
|
call compile preprocessFileLineNumbers QPATHTOF(dev\debugDisplay.sqf);
|
|
|
|
#endif
|
|
|
|
}] call CBA_fnc_addEventHandler;
|