Remove redundant isDead and player check. This has already been done.

Localized string added as well.
This commit is contained in:
worldwidesorrow
2019-12-11 19:22:02 -06:00
committed by GitHub
parent 5c7a5332cf
commit abf8c1731a

View File

@@ -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;
};