]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fixed adding empty message when attempting to kill a non-existent message
authorz411 <z411@omaera.org>
Fri, 11 Mar 2022 04:39:39 +0000 (01:39 -0300)
committerz411 <z411@omaera.org>
Fri, 11 Mar 2022 04:39:39 +0000 (01:39 -0300)
qcsrc/client/hud/panel/centerprint.qc

index f37d0c24a04bec2bb006ec075b5a00abf0275a69..abc53c0c43e8120a1f3605f6213c2219a7b67e59 100644 (file)
@@ -96,6 +96,9 @@ void centerprint_Add(int new_id, string strMessage, float duration, int countdow
                }
        }
 
+       if (strMessage == "")
+               return;
+
        if (i == CENTERPRINT_MAX_MSGS)
        {
                // a msg with the same id was not found, add the msg at the next position