fixes #2114 No CPR available in basic medical when revive is enabled

This commit is contained in:
Glowbal 2015-09-05 11:07:10 +02:00
parent 3d342ece20
commit a25f640614
2 changed files with 23 additions and 1 deletions

View File

@ -105,6 +105,28 @@ class ACE_Medical_Actions {
itemConsumed = 0;
litter[] = {};
};
class CPR: Bandage {
displayName = CSTRING(Actions_CPR);
displayNameProgress = CSTRING(Actions_PerformingCPR);
category = "advanced";
treatmentLocations[] = {"All"};
allowedSelections[] = {"body"};
requiredMedic = 0;
treatmentTime = 15;
items[] = {};
condition = QUOTE(!([(_this select 1)] call ace_common_fnc_isAwake) && GVAR(enableRevive));
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
callbackFailure = "";
callbackProgress = "!([((_this select 0) select 1)] call ace_common_fnc_isAwake)";
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationCaller = "AinvPknlMstpSlayWnonDnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "";
animationCallerSelfProne = "";
itemConsumed = 0;
litter[] = {};
};
};
class Advanced {

View File

@ -24,7 +24,7 @@ if (_target getvariable [QGVAR(inReviveState), false]) then {
};
};
if ((random 1) >= 0.6) then {
if (GVAR(level) > 1 && {(random 1) >= 0.6}) then {
_target setvariable [QGVAR(inCardiacArrest), nil,true];
_target setvariable [QGVAR(heartRate), 40];
_target setvariable [QGVAR(bloodPressure), [50,70]];