From abf8c1731ad0903e9ff47ab9924b10eeb6eddb5c Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Wed, 11 Dec 2019 19:22:02 -0600 Subject: [PATCH] Remove redundant isDead and player check. This has already been done. Localized string added as well. --- SQF/dayz_code/medical/publicEH/medEpi.sqf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SQF/dayz_code/medical/publicEH/medEpi.sqf b/SQF/dayz_code/medical/publicEH/medEpi.sqf index 27b59b91e..b79f37060 100644 --- a/SQF/dayz_code/medical/publicEH/medEpi.sqf +++ b/SQF/dayz_code/medical/publicEH/medEpi.sqf @@ -1,16 +1,16 @@ // called by PublicVariableEventHandler "PVCDZ_hlt_Epi", received from the server, -// because another player sent a PVDZ_send = [_unit,"Epinephrine",[_unit,player,"ItemEpinephrine"]]; +// because another player sent a PVDZ_send = [_unit,"Epinephrine",[_unit,player]]; -_array = _this; //_this select 0; -_unit = _array select 0; // healed -_medic = _array select 1; // healer +private ["_unit","_medic"]; -_isDead = _unit getVariable["USEC_isDead",false]; +_unit = _this select 0; +_medic = _this select 1; -//if (local _unit) then {_unit setCaptive false}; // captive ???? +_unit setVariable ["NORRN_unconscious", false, true]; +_unit setVariable ["USEC_isCardiac",false, true]; +r_player_unconscious = false; +r_player_cardiac = false; -if (_unit == player and !(_unit getVariable["USEC_isDead",false]) and _medic != _unit and _medic distance _unit < 5) then { - _unit setVariable ["NORRN_unconscious", false, false]; r_player_unconscious = false; - _unit setVariable ["USEC_isCardiac",false, false]; r_player_cardiac = false; - //AmovPpneMstpSnonWnonDnon_healed +if (_medic != player) then { + format [localize "str_actions_medical_general_received",(name _medic), localize "STR_EQUIP_NAME_14"] call dayz_rollingMessages; };