Fix death messages vehicle detection again

This commit is contained in:
ebaydayz
2016-09-30 20:51:34 -04:00
parent 88c1b83c31
commit d9b785750d
2 changed files with 7 additions and 4 deletions

View File

@@ -185,7 +185,8 @@ if (_unit == player) then {
case (_ammo == "RunOver"): {"runover"};
case (_ammo == "Dragged"): {"eject"};
case (_ammo in MeleeAmmo): {"melee"};
case (!isNil "_wpst" && {!(_wpst select 0 in ["","Throw"]) or {_sourceVehicleType isKindOf "LandVehicle" or {_sourceVehicleType isKindOf "Air"} or {_sourceVehicleType isKindOf "Ship"}}}): {"shot"};
case (!isNil "_wpst" && {!(_wpst select 0 in ["","Throw"])}): {"shot"};
case (_sourceVehicleType isKindOf "LandVehicle" or {_sourceVehicleType isKindOf "Air"} or {_sourceVehicleType isKindOf "Ship"}): {"shot"};
default {"none"};
};
if (dayz_lastDamageSource != "none") then {dayz_lastDamageTime = diag_tickTime;};

View File

@@ -1,6 +1,6 @@
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
private ["_characterID","_minutes","_newObject","_playerID","_key","_pos","_infected","_sourceName","_sourceWeapon","_distance","_message","_method"];
private ["_characterID","_minutes","_newObject","_playerID","_key","_pos","_infected","_sourceName","_sourceWeapon","_distance","_message","_method","_suicide"];
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
_characterID = _this select 0;
@@ -43,8 +43,10 @@ diag_log format ["Player UID#%3 CID#%4 %1 as %5 died at %2",
// EPOCH DEATH MESSAGES
if (_method in ["explosion","melee","shot","shothead","shotheavy"]) then {
if (_sourceName == _playerName) then {
_suicide = _sourceName == _playerName;
if (_method in ["explosion","melee","shot","shothead","shotheavy"] && !(_method == "explosion" && _suicide)) then {
if (_suicide) then {
_message = ["suicide",_playerName];
} else {
if (_sourceWeapon == "") then {_sourceWeapon = "unknown weapon";};