mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Remove humanity hit for killing player zombies
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.
This commit is contained in:
@@ -94,10 +94,7 @@ if (_unit == player) then {
|
||||
// - Accidental Murder - \\ When wearing the garb of a non-civilian you are taking your life in your own hands
|
||||
// Attackers humanity should not be punished for killing a survivor who has shrouded his identity in military garb.
|
||||
|
||||
_punishment =
|
||||
((_isBandit ||
|
||||
{player getVariable ["OpenTarget",false]}) &&
|
||||
{!_isPZombie});
|
||||
_punishment = ((_isBandit or {player getVariable ["OpenTarget",false]}) && !_isPZombie);
|
||||
_humanityHit = 0;
|
||||
|
||||
if (!_punishment && {(dayz_lastHumanityChange + 3) < diag_tickTime}) then {
|
||||
|
||||
@@ -76,14 +76,12 @@ _array = _this;
|
||||
if (count _array > 0) then {
|
||||
_source = _array select 0;
|
||||
_method = _array select 1;
|
||||
if ((!isNull _source) && (_source != player)) then {
|
||||
if (!isNull _source && _source != player && isPlayer _source) then { //Don't send humanity hit to AI units
|
||||
_isBandit = (player getVariable["humanity",0]) <= -2000;
|
||||
//_isBandit = (_model in ["Bandit1_DZ","BanditW1_DZ"]);
|
||||
|
||||
//if you are a bandit or start first - player will not recieve humanity drop
|
||||
_punishment =
|
||||
_isBandit ||
|
||||
{player getVariable ["OpenTarget",false]};
|
||||
_punishment = ((_isBandit or {player getVariable ["OpenTarget",false]}) && !_isPZombie);
|
||||
_humanityHit = 0;
|
||||
|
||||
if (!_punishment) then {
|
||||
@@ -102,13 +100,10 @@ if (count _array > 0) then {
|
||||
_killsV = _source getVariable ["banditKills",0];
|
||||
_source setVariable ["banditKills",(_killsV + 1),true];
|
||||
};
|
||||
};
|
||||
_body setVariable ["deathType",_method,true];
|
||||
|
||||
//Setup for study bodys.
|
||||
if ((!isNull _source) && (_source != player)) then {
|
||||
//Setup for study bodys.
|
||||
_body setVariable ["KillingBlow",_source,true];
|
||||
};
|
||||
_body setVariable ["deathType",_method,true];
|
||||
};
|
||||
|
||||
terminate dayz_musicH;
|
||||
|
||||
@@ -45,7 +45,6 @@ if ((_unit == player) or (vehicle player != player)) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
|
||||
} else {
|
||||
//PVCDZ_plr_Humanity = [player,50];
|
||||
[50,0] call player_humanityChange;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ if ((_unit == player) or (vehicle player != player)) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
||||
} else {
|
||||
//PVCDZ_plr_Humanity = [player,20];
|
||||
[20,0] call player_humanityChange;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user