From a16721a1eabfdd84be8f8eec1de81c92e3cdd90e Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 8 May 2018 11:12:01 +0100 Subject: [PATCH] Fix medical statemachine function calls --- addons/medical_feedback/XEH_PREP.hpp | 2 -- .../functions/fnc_effectHeartBeat.sqf | 4 ++-- addons/medical_gui/XEH_PREP.hpp | 1 - addons/medical_gui/config.cpp | 4 ---- addons/medical_statemachine/Statemachine.hpp | 18 +++++++++--------- addons/medical_statemachine/XEH_PREP.hpp | 2 +- addons/medical_treatment/stringtable.xml | 4 ++-- 7 files changed, 14 insertions(+), 21 deletions(-) diff --git a/addons/medical_feedback/XEH_PREP.hpp b/addons/medical_feedback/XEH_PREP.hpp index c7f0dd1dfb..3879a25bb1 100644 --- a/addons/medical_feedback/XEH_PREP.hpp +++ b/addons/medical_feedback/XEH_PREP.hpp @@ -1,5 +1,3 @@ -TRACE_1("",QUOTE(ADDON)); - PREP(effectBleeding); PREP(effectBloodVolume); PREP(effectHeartBeat); diff --git a/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf b/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf index 91d00843b9..1e2a5f2f46 100644 --- a/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf +++ b/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf @@ -23,11 +23,11 @@ switch (true) do { case (_heartRate > 160): { // playSound SND_HEARBEAT_FAST; // Array doesn't blend together well, just play one file consistently playSound "ACE_heartbeat_fast_1"; - [DFUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute; + [FUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute; }; case (_heartRate < 60): { playSound SND_HEARBEAT_SLOW; - [DFUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute; + [FUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute; }; default { diff --git a/addons/medical_gui/XEH_PREP.hpp b/addons/medical_gui/XEH_PREP.hpp index 440bfc4a0e..ac7e740deb 100644 --- a/addons/medical_gui/XEH_PREP.hpp +++ b/addons/medical_gui/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(canOpenMenu); PREP(openMenu); PREP(onMenuOpen); diff --git a/addons/medical_gui/config.cpp b/addons/medical_gui/config.cpp index 6207d6c7da..7b7880c055 100644 --- a/addons/medical_gui/config.cpp +++ b/addons/medical_gui/config.cpp @@ -18,7 +18,3 @@ class CfgPatches { #include "ui\menu.hpp" #include "ACE_Settings.hpp" #include "CfgVehicles.hpp" - -class ACE_newEvents { - Medical_onMenuOpen = "ace_medicalMenuOpened"; -}; diff --git a/addons/medical_statemachine/Statemachine.hpp b/addons/medical_statemachine/Statemachine.hpp index 1d9a08cba9..f858a87542 100644 --- a/addons/medical_statemachine/Statemachine.hpp +++ b/addons/medical_statemachine/Statemachine.hpp @@ -5,7 +5,7 @@ class ACE_Medical_StateMachine { skipNull = 1; class Default { - onState = QUOTE(DFUNC(handleStateDefault)); + onState = QFUNC(handleStateDefault); class Injury { targetState = "Injured"; events[] = {QGVAR(Injury)}; @@ -24,7 +24,7 @@ class ACE_Medical_StateMachine { }; }; class Injured { - onState = QUOTE(DFUNC(handleStateInjured)); + onState = QFUNC(handleStateInjured); class FullHeal { targetState = "Default"; events[] = {QGVAR(FullHeal)}; @@ -43,7 +43,7 @@ class ACE_Medical_StateMachine { }; }; class Unconscious { - onState = QUOTE(DFUNC(handleStateUnconscious)); + onState = QFUNC(handleStateUnconscious); onStateEntered = QUOTE([ARR_2(_this,(true))] call FUNC(setUnconsciousStatemachine)); class DeathAI { targetState = "Dead"; @@ -67,7 +67,7 @@ class ACE_Medical_StateMachine { class FatalInjury { // Transition state for handling instant death // This state raises the next transition in the same frame - onStateEntered = QUOTE(DFUNC(enteredStateFatalInjury)); + onStateEntered = QFUNC(enteredStateFatalInjury); class DeathAI { events[] = {QGVAR(FatalInjuryInstantTransition)}; targetState = "Dead"; @@ -77,7 +77,7 @@ class ACE_Medical_StateMachine { events[] = {QGVAR(FatalInjuryInstantTransition)}; targetState = "CardiacArrest"; condition = QUOTE(GVAR(fatalInjuryCondition) > 0); - onTransition = QUOTE(DFUNC(transitionSecondChance)); + onTransition = QFUNC(transitionSecondChance); }; class Death { events[] = {QGVAR(FatalInjuryInstantTransition)}; @@ -86,15 +86,15 @@ class ACE_Medical_StateMachine { }; }; class CardiacArrest { - onStateEntered = QUOTE(DFUNC(enteredStateCardiacArrest)); - onStateLeaving = QUOTE(DFUNC(leftStateCardiacArrest)); + onStateEntered = QFUNC(enteredStateCardiacArrest); + onStateLeaving = QFUNC(leftStateCardiacArrest); class DeathAI { targetState = "Dead"; condition = QUOTE(!isPlayer _this && {GVAR(fatalInjuryConditionAI)}); }; class Timeout { targetState = "Dead"; - condition = QUOTE(DFUNC(conditionCardiacArrestTimer)); + condition = QEFUNC(medical,conditionCardiacArrestTimer); }; class Reanimation { targetState = "Unconscious"; @@ -102,7 +102,7 @@ class ACE_Medical_StateMachine { }; class Execution { targetState = "Dead"; - condition = QUOTE(DFUNC(conditionExecutionDeath)); + condition = QEFUNC(medical,conditionExecutionDeath); events[] = {QGVAR(FatalInjury)}; }; }; diff --git a/addons/medical_statemachine/XEH_PREP.hpp b/addons/medical_statemachine/XEH_PREP.hpp index aa9df92936..b4ef46fa69 100644 --- a/addons/medical_statemachine/XEH_PREP.hpp +++ b/addons/medical_statemachine/XEH_PREP.hpp @@ -4,4 +4,4 @@ PREP(handleStateDefault); PREP(handleStateInjured); PREP(handleStateUnconscious); PREP(leftStateCardiacArrest); -PREP(transitionStateSecondChance); +PREP(transitionSecondChance); diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index 72b3f308d7..8484df6b9c 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -96,7 +96,7 @@ How long should Medkit take to apply ? - How long should Medkit take to apply ? Use 0 for default (based on damage) + How long should Medkit take to apply ? Use 0 for default (based on damage)