From a84af7ba9a41a9eb2646be4dd70465f679322932 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 4 Apr 2020 22:01:51 -0500 Subject: [PATCH] Medical - Improve some error msgs (#7588) --- addons/medical_engine/functions/fnc_setStructuralDamage.sqf | 4 +--- addons/medical_engine/functions/fnc_updateDamageEffects.sqf | 2 +- addons/medical_feedback/functions/fnc_playInjuredSound.sqf | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/addons/medical_engine/functions/fnc_setStructuralDamage.sqf b/addons/medical_engine/functions/fnc_setStructuralDamage.sqf index 5e3dcd7b05..4f2888ff71 100644 --- a/addons/medical_engine/functions/fnc_setStructuralDamage.sqf +++ b/addons/medical_engine/functions/fnc_setStructuralDamage.sqf @@ -18,9 +18,7 @@ params [["_unit", objNull, [objNull]], ["_damage", 0, [0]]]; -if (!local _unit) exitWith { - ERROR("Unit not local or null"); -}; +if (!local _unit) exitWith { ERROR_2("setStructuralDamage: Unit not local or null [%1:%2]",_unit,typeOf _unit); }; private _hitPointDamages = getAllHitPointsDamage _unit param [2, []]; diff --git a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf index 616e96970c..b58faf4057 100644 --- a/addons/medical_engine/functions/fnc_updateDamageEffects.sqf +++ b/addons/medical_engine/functions/fnc_updateDamageEffects.sqf @@ -18,7 +18,7 @@ params [["_unit", objNull, [objNull]]]; -if (!local _unit) exitWith { ERROR("Unit not local or null"); }; +if (!local _unit) exitWith { ERROR_2("updateDamageEffects: Unit not local or null [%1:%2]",_unit,typeOf _unit); }; private _isLimping = false; diff --git a/addons/medical_feedback/functions/fnc_playInjuredSound.sqf b/addons/medical_feedback/functions/fnc_playInjuredSound.sqf index b379d266ff..391d7c3689 100644 --- a/addons/medical_feedback/functions/fnc_playInjuredSound.sqf +++ b/addons/medical_feedback/functions/fnc_playInjuredSound.sqf @@ -23,9 +23,8 @@ params [["_unit", objNull, [objNull]], ["_type", "hit", [""]], ["_severity", 0, [0]]]; // TRACE_3("",_unit,_type,_severity); -if (!local _unit) exitWith { - ERROR("Unit not local or null"); -}; +if (!local _unit) exitWith { ERROR_2("playInjuredSound: Unit not local or null [%1:%2]",_unit,typeOf _unit); }; + if !(_unit call EFUNC(common,isAwake)) exitWith {}; // Handle timeout