mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add back fall damage block for local explosion cheats
Vanilla commit:
a02294421c
This commit is contained in:
@@ -45,13 +45,23 @@ _falling = (((_hit == "legs") AND {(_source==_unit)}) AND {((_ammo=="") AND {(Da
|
||||
if (_ammo == "") exitwith { _end = true; };
|
||||
|
||||
//If _source contains no object exit. But lets not exit if the unit returns player. Maybe its his own fault.
|
||||
if (isNull _source) then { _end = true; };
|
||||
if (isNull _source) then {
|
||||
_end = true;
|
||||
if !(_ammo in ["Dragged","RunOver"]) then {
|
||||
// Explosion with no vehicle nearby. Possible cheat. Record to block any incoming fall damage.
|
||||
dayz_lastDamageSourceNull = true;
|
||||
diag_log "dayz_lastDamageSourceNull triggered";
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (dayz_lastDamageSourceNull) then { _end = true; }; // Block incoming fall damage.
|
||||
};
|
||||
|
||||
|
||||
if (_end) exitwith { 0 };
|
||||
//End Simple hack for damage ***until 2.0***
|
||||
|
||||
dayz_lastDamageSourceNull = false;
|
||||
|
||||
if (_unit == player) then {
|
||||
//Set player in combat
|
||||
|
||||
@@ -592,6 +592,7 @@ if (!isDedicated) then {
|
||||
dayz_temperaturmin = 27; //TeeChange
|
||||
|
||||
//player special variables
|
||||
dayz_lastDamageSourceNull = false;
|
||||
dayz_lastDamageSource = "none";
|
||||
dayz_lastDamageTime = 0;
|
||||
dayz_lastMedicalSource = "none";
|
||||
|
||||
Reference in New Issue
Block a user