From 06b8c4fb78fd7c01f805b0f7f345ce6284eb9169 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Wed, 18 Jul 2018 22:26:46 +0200 Subject: [PATCH] Fix some script errors on medical rewrite --- addons/medical_blood/functions/fnc_isBleeding.sqf | 2 +- addons/medical_damage/functions/fnc_woundsHandler.sqf | 2 +- addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf | 2 +- addons/medical_feedback/XEH_postInit.sqf | 4 ++-- .../medical_statemachine/functions/fnc_handleStateDefault.sqf | 2 +- .../medical_statemachine/functions/fnc_handleStateInjured.sqf | 2 +- .../functions/fnc_handleStateUnconscious.sqf | 2 +- .../functions/fnc_setUnconsciousStatemachine.sqf | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/medical_blood/functions/fnc_isBleeding.sqf b/addons/medical_blood/functions/fnc_isBleeding.sqf index 37648dd85be..b015cbe77a2 100644 --- a/addons/medical_blood/functions/fnc_isBleeding.sqf +++ b/addons/medical_blood/functions/fnc_isBleeding.sqf @@ -18,7 +18,7 @@ params ["_unit"]; if (GVAR(useAceMedical)) exitWith { - IS_BLEEDING(_unit) + IS_BLEEDING(_unit); }; alive _unit && {getDammage _unit > 0.3} diff --git a/addons/medical_damage/functions/fnc_woundsHandler.sqf b/addons/medical_damage/functions/fnc_woundsHandler.sqf index 7bbd1737b6f..cf6eb118cef 100644 --- a/addons/medical_damage/functions/fnc_woundsHandler.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandler.sqf @@ -113,7 +113,7 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; _bodyPartVisParams call EFUNC(medical_engine,updateBodyPartVisuals); [_unit, _painLevel] call EFUNC(medical,adjustPainLevel); -[QGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent; +[QEGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent; if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then { [_unit] call FUNC(handleIncapacitation); diff --git a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf index 8b0fb1e075e..84f4386e80a 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf @@ -171,7 +171,7 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; _bodyPartVisParams call EFUNC(medical_engine,updateBodyPartVisuals); [_unit, _painLevel] call EFUNC(medical,adjustPainLevel); -[QGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent; +[QEGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent; if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then { [_unit] call FUNC(handleIncapacitation); diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index 41292f70743..948bf1d9a86 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -1,11 +1,11 @@ #include "script_component.hpp" -[QGVAR(medical,injured), { +[QEGVAR(medical,injured), { params ["_unit", "_painLevel"]; [_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call FUNC(playInjuredSound); }] call CBA_fnc_addEventHandler; -[QGVAR(medical,moan), { +[QEGVAR(medical,moan), { params ["_unit", "_painLevel"]; [_unit, "moan", PAIN_TO_MOAN(_painLevel)] call FUNC(playInjuredSound); }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf b/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf index 9eb56d328d8..ff84fa3f32b 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateDefault.sqf @@ -19,5 +19,5 @@ if (!local _unit) exitWith { private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { - [QGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent; + [QEGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent; }; diff --git a/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf b/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf index d17142a8fd1..9d5ddbf2f73 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateInjured.sqf @@ -17,6 +17,6 @@ if (!local _unit) exitWith { private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { - [QGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent; + [QEGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent; }; diff --git a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf index e5622d03cf8..e6320b5fbb8 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf @@ -18,7 +18,7 @@ if (!local _unit) exitWith { private _painLevel = GET_PAIN_PERCEIVED(_unit); if (_painLevel > 0) then { - [QGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent; + [QEGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent; }; // Handle spontaneous wakeup from unconsciousness diff --git a/addons/medical_status/functions/fnc_setUnconsciousStatemachine.sqf b/addons/medical_status/functions/fnc_setUnconsciousStatemachine.sqf index da8c07360a2..d7013c2efb6 100644 --- a/addons/medical_status/functions/fnc_setUnconsciousStatemachine.sqf +++ b/addons/medical_status/functions/fnc_setUnconsciousStatemachine.sqf @@ -30,7 +30,7 @@ _unit setVariable [VAR_UNCON, _knockOut, true]; if (_knockOut) then { // --- knock out - if (GVAR(spontaneousWakeUpChance) > 0) then { // Don't bother setting this if not used + if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { // Don't bother setting this if not used private _lastWakeUpCheck = CBA_missiontime max (_unit getVariable [QGVAR(lastWakeUpCheck), 0]); TRACE_2("setting lastWakeUpCheck",_lastWakeUpCheck,(_lastWakeUpCheck - CBA_missiontime)); _unit setVariable [QGVAR(lastWakeUpCheck), _lastWakeUpCheck]; @@ -43,7 +43,7 @@ if (_knockOut) then { closeDialog 0; }; }; - [QGVAR(Unconscious), _unit] call CBA_fnc_localEvent; + [QEGVAR(medical,Unconscious), _unit] call CBA_fnc_localEvent; } else { // --- wake up _unit setVariable [QGVAR(lastWakeUpCheck), nil]; // clear this now (min wait time could be set to a very high value)