]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't check each notification choice cvar 4 times, improves client-side performance...
authorMario <mario.mario@y7mail.com>
Tue, 24 Dec 2019 17:10:00 +0000 (03:10 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 24 Dec 2019 17:10:00 +0000 (03:10 +1000)
qcsrc/common/notifications/all.qh

index d8555006595808e40096c59dd418f5e423627622..e9ddf429cdf7fd5a439467fc70b048f4d2960db8 100644 (file)
@@ -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);