From 59159f9e31dac6935f80d4443230f10dc69fc657 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 16 Jan 2017 19:07:54 +0100 Subject: [PATCH 1/1] Simplify notif_arg_missing_teams --- qcsrc/common/notifications/all.qh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 22f2006a7..31119e259 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -470,11 +470,11 @@ string notif_arg_frag_stats(float fhealth, float farmor, float fping) string notif_arg_missing_teams(float f1) { - return sprintf("%s%s%s%s", - ((f1 & BIT(0)) ? sprintf("%s%s", Team_ColoredFullName(NUM_TEAM_1), (f1 & (BIT(1) | BIT(2) | BIT(3)) ? ", " : "")) : ""), - ((f1 & BIT(1)) ? sprintf("%s%s", Team_ColoredFullName(NUM_TEAM_2), (f1 & ( BIT(2) | BIT(3)) ? ", " : "")) : ""), - ((f1 & BIT(2)) ? sprintf("%s%s", Team_ColoredFullName(NUM_TEAM_3), (f1 & ( BIT(3)) ? ", " : "")) : ""), - ((f1 & BIT(3)) ? Team_ColoredFullName(NUM_TEAM_4) : "") + return strcat( + ((f1 & BIT(0)) ? strcat(Team_ColoredFullName(NUM_TEAM_1), (f1 >> 1) ? ", " : "") : ""), + ((f1 & BIT(1)) ? strcat(Team_ColoredFullName(NUM_TEAM_2), (f1 >> 2) ? ", " : "") : ""), + ((f1 & BIT(2)) ? strcat(Team_ColoredFullName(NUM_TEAM_3), (f1 >> 3) ? ", " : "") : ""), + ((f1 & BIT(3)) ? Team_ColoredFullName(NUM_TEAM_4) : "") ); } -- 2.39.2