Update AI hit log

Correction for 6239959

@oiad isPlayer is not reliable on dead units which may be passed to
fa_plr2Str. Also, the other scripts which call fa_plr2Str always provide
a player, so we only want to check for AI on the hit log source.
This commit is contained in:
ebayShopper
2017-09-19 12:11:27 -04:00
parent f69bd80f43
commit 6ab4faba39
2 changed files with 2 additions and 2 deletions

View File

@@ -444,7 +444,7 @@ if (dayz_townGenerator) then {execVM "\z\addons\dayz_server\system\lit_fireplace
_source = _x select 1;
if (!isNull _source) then {
diag_log format ["P1ayer %1 hit by %2 %3 from %4 meters in %5 for %6 damage",
_unit call fa_plr2Str, _source call fa_plr2Str, toString (_x select 2), _x select 3, _x select 4, _x select 5];
_unit call fa_plr2Str, if (!isPlayer _source && alive _source) then {localize "STR_PLAYER_AI"} else {_source call fa_plr2Str}, toString (_x select 2), _x select 3, _x select 4, _x select 5];
};
};
};