mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix medical statemachine function calls
This commit is contained in:
parent
697aa5dc08
commit
a16721a1ea
@ -1,5 +1,3 @@
|
||||
TRACE_1("",QUOTE(ADDON));
|
||||
|
||||
PREP(effectBleeding);
|
||||
PREP(effectBloodVolume);
|
||||
PREP(effectHeartBeat);
|
||||
|
@ -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 {
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
PREP(canOpenMenu);
|
||||
PREP(openMenu);
|
||||
PREP(onMenuOpen);
|
||||
|
@ -18,7 +18,3 @@ class CfgPatches {
|
||||
#include "ui\menu.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
Medical_onMenuOpen = "ace_medicalMenuOpened";
|
||||
};
|
||||
|
@ -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)};
|
||||
};
|
||||
};
|
||||
|
@ -4,4 +4,4 @@ PREP(handleStateDefault);
|
||||
PREP(handleStateInjured);
|
||||
PREP(handleStateUnconscious);
|
||||
PREP(leftStateCardiacArrest);
|
||||
PREP(transitionStateSecondChance);
|
||||
PREP(transitionSecondChance);
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Medical_Treatment">
|
||||
<Key ID="STR_ACE_Medical_Treatment_allowLitterCreation">
|
||||
@ -96,7 +96,7 @@
|
||||
<English>How long should Medkit take to apply ?</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_MedkitTime_Description">
|
||||
<English>How long should Medkit take to apply ? Use 0 for default (based on damage)</English>
|
||||
<English>How long should Medkit take to apply ? Use 0 for default (based on damage)</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user