From 4c5ba5f6f55b9a2d5624f04d10395af697c2228f Mon Sep 17 00:00:00 2001 From: TimePath Date: Thu, 10 Dec 2015 16:46:27 +1100 Subject: [PATCH] (SAME|DIFF)_TEAM: optimize --- qcsrc/common/teams.qh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh index 074835d5e..9fc5bdb18 100644 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@ -160,8 +160,8 @@ float Team_TeamToNumber(float teamid) #define TCR(input,teamcolor,teamtext) strreplace("^TC", teamcolor, strreplace("^TT", teamtext, input)) // safe team comparisons -#define SAME_TEAM(a,b) (teamplay ? ((a.team == b.team) ? 1 : 0) : ((a == b) ? 1 : 0)) -#define DIFF_TEAM(a,b) (teamplay ? ((a.team != b.team) ? 1 : 0) : ((a != b) ? 1 : 0)) +#define SAME_TEAM(a,b) (teamplay ? (a.team == b.team) : (a == b)) +#define DIFF_TEAM(a,b) (teamplay ? (a.team != b.team) : (a != b)) // used for notification system multi-team identifiers #define APP_TEAM_NUM_2(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : prefix##BLUE) -- 2.39.2