From 03576b86b96cc363f70590de5936725a05c209e7 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 12 Sep 2019 21:50:50 -0500 Subject: [PATCH] MedicalSM - Tweak isPlayer checks style (#7178) --- .../functions/fnc_conditionExecutionDeath.sqf | 7 +++++-- .../functions/fnc_conditionSecondChance.sqf | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/medical_statemachine/functions/fnc_conditionExecutionDeath.sqf b/addons/medical_statemachine/functions/fnc_conditionExecutionDeath.sqf index fe65aff964..26ff20c42a 100644 --- a/addons/medical_statemachine/functions/fnc_conditionExecutionDeath.sqf +++ b/addons/medical_statemachine/functions/fnc_conditionExecutionDeath.sqf @@ -17,6 +17,9 @@ params ["_unit"]; -(isPlayer _unit && {GVAR(fatalInjuriesPlayer) != FATAL_INJURIES_NEVER} -|| {!isPlayer _unit && {GVAR(fatalInjuriesAI) != FATAL_INJURIES_NEVER}}) +(if (isPlayer _unit) then { + GVAR(fatalInjuriesPlayer) != FATAL_INJURIES_NEVER +} else { + GVAR(fatalInjuriesAI) != FATAL_INJURIES_NEVER +}) && {!(_unit getVariable [QEGVAR(medical,deathBlocked), false])} diff --git a/addons/medical_statemachine/functions/fnc_conditionSecondChance.sqf b/addons/medical_statemachine/functions/fnc_conditionSecondChance.sqf index 247526eaa9..660ea84ac1 100644 --- a/addons/medical_statemachine/functions/fnc_conditionSecondChance.sqf +++ b/addons/medical_statemachine/functions/fnc_conditionSecondChance.sqf @@ -17,4 +17,8 @@ params ["_unit"]; -isPlayer _unit && {GVAR(fatalInjuriesPlayer) != FATAL_INJURIES_ALWAYS} || {!isPlayer _unit && {GVAR(fatalInjuriesAI) != FATAL_INJURIES_ALWAYS}} +if (isPlayer _unit) then { + GVAR(fatalInjuriesPlayer) != FATAL_INJURIES_ALWAYS +} else { + GVAR(fatalInjuriesAI) != FATAL_INJURIES_ALWAYS +}