From: TimePath Date: Thu, 10 Dec 2015 05:46:27 +0000 (+1100) Subject: (SAME|DIFF)_TEAM: optimize X-Git-Tag: xonotic-v0.8.2~1523 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4c5ba5f6f55b9a2d5624f04d10395af697c2228f;p=xonotic%2Fxonotic-data.pk3dir.git (SAME|DIFF)_TEAM: optimize --- 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)