Add back fall damage block for local explosion cheats

Vanilla commit:

https://github.com/DayZMod/DayZ/commit/a02294421c53d34371cb6424a9ef97f2bb51e7f4
This commit is contained in:
ebaydayz
2016-08-21 13:05:51 -04:00
parent 19dd6f26ab
commit da2faeb6d0
2 changed files with 12 additions and 1 deletions
+11 -1
View File
@@ -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
+1
View File
@@ -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";