mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Use more efficient check for "shot" death message
Most of the time the source will be local (zombie) or player (physics). The next most common will be getting shot by a remote player, the least common will be getting shot by a remote vehicle.
This commit is contained in:
@@ -183,9 +183,8 @@ if (_unit == player) then {
|
||||
case (_ammo == "RunOver"): {"runover"};
|
||||
case (_ammo == "Dragged"): {"eject"};
|
||||
case (_ammo in MeleeAmmo): {"melee"};
|
||||
case (_isMan && !local _source && !(currentWeapon _source in ["","Throw"])): {"shot"};
|
||||
//(vehicle _source != _source) does not work to detect if source unit is in a vehicle in HandleDamage EH
|
||||
case (_sourceVehicleType isKindOf "LandVehicle" or _sourceVehicleType isKindOf "Air" or _sourceVehicleType isKindOf "Ship"): {"shot"};
|
||||
case (!local _source && {(_isMan && !(currentWeapon _source in ["","Throw"])) or {_sourceVehicleType isKindOf "LandVehicle" or _sourceVehicleType isKindOf "Air" or _sourceVehicleType isKindOf "Ship"}}): {"shot"};
|
||||
default {"none"};
|
||||
};
|
||||
if (dayz_lastDamageSource != "none") then {dayz_lastDamageTime = diag_tickTime;};
|
||||
|
||||
Reference in New Issue
Block a user