From c92fd89c7a858780898c6f19eb6f6617e9db1071 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 8 May 2018 08:47:03 +0100 Subject: [PATCH] Fix pain percieved function calls --- addons/medical/XEH_postInit.sqf | 2 +- addons/medical/functions/fnc_dev_watchMedicalStats.sqf | 2 +- addons/medical/functions/fnc_displayPatientInformation.sqf | 2 +- addons/medical/functions/fnc_handleIncapacitation.sqf | 2 +- addons/medical_ai/functions/fnc_isInjured.sqf | 2 +- addons/medical_gui/functions/fnc_updateUIInfo.sqf | 2 +- .../medical_statemachine/functions/fnc_handleStateDefault.sqf | 2 +- .../medical_statemachine/functions/fnc_handleStateInjured.sqf | 2 +- .../functions/fnc_handleStateUnconscious.sqf | 2 +- addons/medical_vitals/functions/fnc_handleUnitVitals.sqf | 2 +- addons/medical_vitals/functions/fnc_updateHeartRate.sqf | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 8b6ad741ec..6c36347053 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -27,7 +27,7 @@ if (isServer) then { if (!hasInterface) exitWith {}; [missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), { - private _pain = [ACE_player] call FUNC(getPainLevel); + private _pain = GET_PAIN_PERCEIVED(ACE_player); linearConversion [0, 1, _pain, 1, 5, true]; }] call EFUNC(common,arithmeticSetSource); diff --git a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf index 72dd25f675..413ae85035 100644 --- a/addons/medical/functions/fnc_dev_watchMedicalStats.sqf +++ b/addons/medical/functions/fnc_dev_watchMedicalStats.sqf @@ -57,7 +57,7 @@ // Pain: private _pain = _unit getVariable [QEGVAR(medical,pain), 0]; private _painSuppress = _unit getVariable [QEGVAR(medical,painSuppress), 0]; - private _painLevel = [_unit] call EFUNC(medical,getPainLevel); + private _painLevel = GET_PAIN_PERCEIVED(_unit); _return pushBack format ["Effective Pain: %1", _painLevel toFixed 3]; _return pushBack format [" - [Pain: %1] [Suppress: %2]", _pain toFixed 3, _painSuppress toFixed 3]; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 61c3e0d19d..f545259b63 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -63,7 +63,7 @@ if (_show == 1) then { _genericMessages pushback [localize ELSTRING(medical,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; }; if (EGVAR(medical,showPainInMenu) && {[ACE_player, EGVAR(medical,medicSetting_PainVisualization)] call EFUNC(medical,isMedic)}) then { - private _painLevel = _target call EFUNC(medical,getPainLevel); + private _painLevel = GET_PAIN_PERCEIVED(_target); if (_painLevel > 0) then { private _painText = localize ELSTRING(medical,Status_Pain); if (_painLevel < 0.1) then { diff --git a/addons/medical/functions/fnc_handleIncapacitation.sqf b/addons/medical/functions/fnc_handleIncapacitation.sqf index 6808a25c4c..6bb9703c73 100644 --- a/addons/medical/functions/fnc_handleIncapacitation.sqf +++ b/addons/medical/functions/fnc_handleIncapacitation.sqf @@ -14,7 +14,7 @@ params ["_unit"]; -private _painLevel = [_unit] call FUNC(getPainLevel); +private _painLevel = GET_PAIN_PERCEIVED(_unit); private _bodyPartDamage = _unit getVariable [QGVAR(bodyPartDamage), [0,0,0,0,0,0]]; _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightArmDamage", "_leftLegDamage", "_rightLegDamage"]; diff --git a/addons/medical_ai/functions/fnc_isInjured.sqf b/addons/medical_ai/functions/fnc_isInjured.sqf index 4a1751c305..fb3b5dc9d3 100644 --- a/addons/medical_ai/functions/fnc_isInjured.sqf +++ b/addons/medical_ai/functions/fnc_isInjured.sqf @@ -18,7 +18,7 @@ if !(alive _this) exitWith {false}; private _bloodLoss = GET_BLOOD_LOSS(_this); -private _pain = GET_PAIN_TOTAL(_this); +private _pain = GET_PAIN_PERCEIVED(_this); private _unconscious = IS_UNCONSCIOUS(_this); (_bloodLoss > 0) || {_pain > 0.2} || _unconscious diff --git a/addons/medical_gui/functions/fnc_updateUIInfo.sqf b/addons/medical_gui/functions/fnc_updateUIInfo.sqf index a15ac38975..0b7c46b42f 100644 --- a/addons/medical_gui/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_gui/functions/fnc_updateUIInfo.sqf @@ -40,7 +40,7 @@ if (((_target getVariable [QEGVAR(medical,tourniquets), [0, 0, 0, 0, 0, 0]]) sel }; if (EGVAR(medical,showPainInMenu) && {[ACE_player, EGVAR(medical,medicSetting_PainVisualization)] call EFUNC(medical,isMedic)}) then { - private _painLevel = _target call EFUNC(medical,getPainLevel); + private _painLevel = GET_PAIN_PERCEIVED(_target); if (_painLevel > 0) then { private _painText = localize ELSTRING(medical,Status_Pain); if (_painLevel < 0.1) then { diff --git a/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf b/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf index c117b88c40..9827f0894e 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf @@ -15,7 +15,7 @@ if (!local _unit) exitWith { [_unit] call FUNC(handleUnitVitals); -private _painLevel = [_unit] call FUNC(getPainLevel); +private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { [_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound); }; diff --git a/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf b/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf index c117b88c40..9827f0894e 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf @@ -15,7 +15,7 @@ if (!local _unit) exitWith { [_unit] call FUNC(handleUnitVitals); -private _painLevel = [_unit] call FUNC(getPainLevel); +private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { [_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound); }; diff --git a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf index 123f8f9f1f..d014ac415b 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf @@ -16,7 +16,7 @@ if (!local _unit) exitWith { [_unit] call FUNC(handleUnitVitals); -private _painLevel = [_unit] call FUNC(getPainLevel); +private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { [_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound); }; diff --git a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf index 86d89fbc5c..a3962462f7 100644 --- a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf @@ -73,7 +73,7 @@ if (_bloodLoss > 0) then { }; }; -private _painLevel = [_unit] call FUNC(getPainLevel); +private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { if !(_unit getVariable [QGVAR(hasPain), false]) then { _unit setVariable [QGVAR(hasPain), true, true]; diff --git a/addons/medical_vitals/functions/fnc_updateHeartRate.sqf b/addons/medical_vitals/functions/fnc_updateHeartRate.sqf index 3eedfeee3c..2a19f64626 100644 --- a/addons/medical_vitals/functions/fnc_updateHeartRate.sqf +++ b/addons/medical_vitals/functions/fnc_updateHeartRate.sqf @@ -52,7 +52,7 @@ if (!(_unit getVariable [QGVAR(inCardiacArrest), false])) then { if (_bloodVolume > BLOOD_VOLUME_CLASS_4_HEMORRHAGE) then { ([_unit] call FUNC(getBloodPressure)) params ["_bloodPressureL", "_bloodPressureH"]; private _meanBP = (2/3) * _bloodPressureH + (1/3) * _bloodPressureL; - private _painLevel = [_unit] call FUNC(getPainLevel); + private _painLevel = GET_PAIN_PERCEIVED(_unit); private _targetBP = 107; if (_bloodVolume < BLOOD_VOLUME_CLASS_3_HEMORRHAGE) then {