mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed instant death and PREP
This commit is contained in:
parent
ba9fc9240c
commit
928ded0e66
@ -62,12 +62,15 @@ 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));
|
||||
class InstantDeathPrevented {
|
||||
events[] = {QGVAR(FatalInjuryInstantTransition)};
|
||||
targetState = "CardiacArrest";
|
||||
condition = QUOTE(DFUNC(conditionPreventInstantDeath));
|
||||
condition = QUOTE(!GVAR(enableInstantDeath));
|
||||
};
|
||||
class InstantDeath {
|
||||
events[] = {QGVAR(FatalInjuryInstantTransition)};
|
||||
targetState = "Dead";
|
||||
condition = "true";
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
PREP(adjustPainLevel);
|
||||
PREP(getBloodLoss);
|
||||
PREP(getBloodPressure);
|
||||
@ -15,12 +14,16 @@ PREP(isMedicalVehicle);
|
||||
|
||||
// PREP(hasMedicalEnabled);
|
||||
|
||||
PREP(enteredStateCardiacArrest);
|
||||
PREP(leavingStateCardiacArrest);
|
||||
|
||||
PREP(enteredStateFatalInjury);
|
||||
|
||||
PREP(handleStateDefault);
|
||||
PREP(handleStateInjured);
|
||||
PREP(handleStateUnconscious);
|
||||
PREP(handleUnitVitals);
|
||||
PREP(handleMedications);
|
||||
// PREP(handleStateRevive);
|
||||
|
||||
PREP(addPain);
|
||||
PREP(setUnconscious);
|
||||
|
16
addons/medical/functions/fnc_enteredStateFatalInjury.sqf
Normal file
16
addons/medical/functions/fnc_enteredStateFatalInjury.sqf
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Raises the transition to the next state instantly when fatally injured.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_unit"];
|
||||
|
||||
[QGVAR(FatalInjuryInstantTransition), _unit] call CBA_fnc_localEvent;
|
Loading…
Reference in New Issue
Block a user