From 0a282c171723d5279db1685ea0f93cf1fb8a031b Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Wed, 11 Dec 2019 19:25:38 -0600 Subject: [PATCH] Remove redundant player check. Add localized message. --- .../medical/publicEH/medPainkiller.sqf | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/medical/publicEH/medPainkiller.sqf b/SQF/dayz_code/medical/publicEH/medPainkiller.sqf index f5fa58840..a1dfaa9ea 100644 --- a/SQF/dayz_code/medical/publicEH/medPainkiller.sqf +++ b/SQF/dayz_code/medical/publicEH/medPainkiller.sqf @@ -1,10 +1,12 @@ -private ["_array","_unit","_medic"]; -_array = _this; //_this select 0; -_unit = _array select 0; -_medic = _array select 1; +private ["_unit","_medic"]; -if ((_unit == player) or (vehicle player != player)) then { - r_player_inpain = false; - _unit setVariable ["USEC_inPain", false, true]; - R3F_TIRED_Accumulator = 0; +_unit = _this select 0; +_medic = _this select 1; + +r_player_inpain = false; +_unit setVariable ["USEC_inPain", false, true]; +R3F_TIRED_Accumulator = 0; + +if (_medic != player) then { + format [localize "str_actions_medical_painkillers_receive",(name _medic)] call dayz_rollingMessages; };