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

@@ -250,7 +250,7 @@ fa_plr2str = {
_name = _x getVariable ["bodyName", nil];
if ((isNil "_name" OR {(_name == "")}) AND ({alive _x})) then { _name = name _x; };
if (isNil "_name" OR {(_name == "")}) then { _name = "UID#"+(getPlayerUID _x); };
_res = if (isPlayer _x) then {format["PID#%1(%2)", owner _x, _name]} else {localize "STR_PLAYER_AI"};
_res = format["PID#%1(%2)", owner _x, _name ];
};
_res
};