]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix broken notifications with bots
authorz411 <z411@omaera.org>
Tue, 10 Nov 2020 11:47:06 +0000 (08:47 -0300)
committerz411 <z411@omaera.org>
Tue, 10 Nov 2020 11:47:06 +0000 (08:47 -0300)
qcsrc/common/notifications/all.qc

index b2e278a18472c7ff498c3abd465d9ee375610bfc..6038e6df84d120a01c773489ca31bbe86e356ad1 100644 (file)
@@ -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),