Don't show warning on ai -> ai messages

AI's can't receive chat messages. AI's sometimes send chat messages to
other AI's.

Defect introduced in e04506814a.
Refs: #7466

(cherry picked from commit fde696a401)
Signed-off-by: Itms <itms@wildfiregames.com>
This commit is contained in:
phosit 2025-01-09 20:33:21 +01:00 committed by Itms
parent d41356a9cc
commit dcb8ef9b52
No known key found for this signature in database
GPG key ID: C7E52BD14CE14E09

View file

@ -93,7 +93,7 @@ class ChatMessageFormatPlayer
{
addresseeGUID = this.matchUsername(msg.text);
let addressee = g_PlayerAssignments[addresseeGUID];
if (!addressee)
if (msg.player === undefined && !addressee)
{
warn("Couldn't find chat message receiver: " + msg.text);
return false;