From: Mario Date: Tue, 24 Dec 2019 17:10:00 +0000 (+1000) Subject: Don't check each notification choice cvar 4 times, improves client-side performance... X-Git-Tag: xonotic-v0.8.5~1186 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=38c7730947c07033719b39df8372caace8ce4c58;p=xonotic%2Fxonotic-data.pk3dir.git Don't check each notification choice cvar 4 times, improves client-side performance slightly --- 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);