From 38c7730947c07033719b39df8372caace8ce4c58 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 25 Dec 2019 03:10:00 +1000 Subject: [PATCH] Don't check each notification choice cvar 4 times, improves client-side performance slightly --- qcsrc/common/notifications/all.qh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index d85550065..e9ddf429c 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -864,7 +864,7 @@ REGISTRY_END(Notifications) void ReplicateVars(bool would_destroy) { if (!would_destroy) - FOREACH(Notifications, it.nent_type == MSG_CHOICE, { + FOREACH(Notifications, it.nent_type == MSG_CHOICE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), { string cvarname = strcat("notification_", Get_Notif_CvarName(it)); // NOTE: REPLICATE_SIMPLE can return; REPLICATE_SIMPLE(it.cvar_value, cvarname); -- 2.39.2