From: z411 Date: Tue, 10 Nov 2020 11:47:06 +0000 (-0300) Subject: Fix broken notifications with bots X-Git-Tag: xonotic-v0.8.5~654^2~2 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=c164c44eb8024fc2aa478c1fb904eb9da3311469 Fix broken notifications with bots --- diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index b2e278a18..6038e6df8 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -79,6 +79,9 @@ string Notification_CheckArgs( bool Notification_ShouldSend(NOTIF broadcast, entity to_client, entity other_client) { + if(!IS_REAL_CLIENT(to_client)) + return false; + switch (broadcast) { case NOTIF_ONE: @@ -1520,7 +1523,7 @@ void Send_Notification( MSG net_type, Notification net_name, ...count) { - if (broadcast != NOTIF_ALL && broadcast != NOTIF_ALL_EXCEPT && !IS_REAL_CLIENT(client)) return; + if (broadcast == NOTIF_ONE_ONLY && !IS_REAL_CLIENT(client)) return; entity notif = net_name; string parms = sprintf("%s, '%s', %s, %s", Get_Notif_BroadcastName(broadcast),