From: z411 Date: Fri, 11 Mar 2022 04:39:39 +0000 (-0300) Subject: Fixed adding empty message when attempting to kill a non-existent message X-Git-Tag: xonotic-v0.8.5~128^2~19 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=69714472743d079039e1765e55488e76a241a28d;p=xonotic%2Fxonotic-data.pk3dir.git Fixed adding empty message when attempting to kill a non-existent message --- diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index f37d0c24a..abc53c0c4 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -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