mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Fix humanity hit for units in vehicles
The only change is a removal of this check and the corresponding
tabs/spacing:
if (_object == player) then {
That returns false if the player is in a vehicle. It is not needed since
PVCDZ_plr_Humanity EH only fires on the intended player now (sent with
PVC instead of PV).
This commit is contained in:
@@ -3,7 +3,6 @@ _object = _this select 0;
|
|||||||
_change = _this select 1;
|
_change = _this select 1;
|
||||||
_wait = if (count _this > 2) then { _this select 2 } else { 0 };
|
_wait = if (count _this > 2) then { _this select 2 } else { 0 };
|
||||||
|
|
||||||
if (_object == player) then {
|
|
||||||
_humanity = (player getVariable["humanity",0]) + _change;
|
_humanity = (player getVariable["humanity",0]) + _change;
|
||||||
player setVariable["humanity",_humanity,true];
|
player setVariable["humanity",_humanity,true];
|
||||||
if (_change < 0) then { //non-bandit player can be "punished" in next "_wait" seconds w/o loosing humanity
|
if (_change < 0) then { //non-bandit player can be "punished" in next "_wait" seconds w/o loosing humanity
|
||||||
@@ -72,4 +71,3 @@ if (_object == player) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user