From 63ed7dbc957e2b0ce365869ceeba751b00c0feec Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sun, 19 Feb 2023 11:10:47 +0100 Subject: [PATCH] merge loops in target_print --- qcsrc/server/compat/quake3.qc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 3dd651e49..464bd8c26 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -308,20 +308,9 @@ void target_print_use(entity this, entity actor, entity trigger) { target_print_message(this, actor); } - else if(red || blue) - { - if(red) - { - FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.team == NUM_TEAM_1, target_print_message(this, it)); - } - if(blue) - { - FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.team == NUM_TEAM_2, target_print_message(this, it)); - } - } else { - FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), target_print_message(this, it)); + FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && ((!red && !blue) || (red && it.team == NUM_TEAM_1) || (blue && it.team == NUM_TEAM_2)), target_print_message(this, it)); } } -- 2.39.5