mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
If you kill a player zombie you should not lose humanity. Player_death is now synced with the humanity hit code in the damage handler. Also the killing blow set variable was moved up because the same conditions were already checked above.
26 lines
603 B
Plaintext
26 lines
603 B
Plaintext
private ["_id","_unit"];
|
|
_unit = (_this select 3) select 0;
|
|
|
|
_unit setVariable ["USEC_inPain", false, true];
|
|
|
|
call fnc_usec_medic_removeActions;
|
|
r_action = false;
|
|
|
|
if (vehicle player == player) then {
|
|
//not in a vehicle
|
|
player playActionNow "Gear";
|
|
};
|
|
|
|
if ((_unit == player) or (vehicle player != player)) then {
|
|
//Self Healing
|
|
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
|
} else {
|
|
[20,0] call player_humanityChange;
|
|
};
|
|
|
|
player removeMagazine "ItemPainkiller";
|
|
|
|
uiSleep 1;
|
|
|
|
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
|
|
publicVariableServer "PVDZ_send"; |