From: Samual Lenks Date: Mon, 4 Mar 2013 20:04:15 +0000 (-0500) Subject: Rename FL_TEAM_ and STR_TEAM_ to NUM_TEAM_ and NAME_TEAM_ respectively X-Git-Tag: xonotic-v0.7.0~62^2~23^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b8c629df9a66ec47cbef42054b958d6a2363aa6a;p=xonotic%2Fxonotic-data.pk3dir.git Rename FL_TEAM_ and STR_TEAM_ to NUM_TEAM_ and NAME_TEAM_ respectively --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index ff3614e24..86fef2687 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -263,10 +263,10 @@ float SetTeam(entity o, float Team) switch(Team) { case -1: - case FL_TEAM_1: - case FL_TEAM_2: - case FL_TEAM_3: - case FL_TEAM_4: + case NUM_TEAM_1: + case NUM_TEAM_2: + case NUM_TEAM_3: + case NUM_TEAM_4: break; default: if(GetTeam(Team, false) == world) diff --git a/qcsrc/client/hook.qc b/qcsrc/client/hook.qc index 72b87ca4e..11070bae5 100644 --- a/qcsrc/client/hook.qc +++ b/qcsrc/client/hook.qc @@ -129,22 +129,22 @@ void Draw_GrapplingHook() case ENT_CLIENT_HOOK: intensity = 1; offset = 0; - if(t == FL_TEAM_1) + if(t == NUM_TEAM_1) { tex = "particles/hook_red"; rgb = '1 .3 .3'; } - else if(t == FL_TEAM_2) + else if(t == NUM_TEAM_2) { tex = "particles/hook_blue"; rgb = '.3 .3 1'; } - else if(t == FL_TEAM_3) + else if(t == NUM_TEAM_3) { tex = "particles/hook_yellow"; rgb = '1 1 .3'; } - else if(t == FL_TEAM_4) + else if(t == NUM_TEAM_4) { tex = "particles/hook_pink"; rgb = '1 .3 1'; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 0c162a757..4b0bfa4fb 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2767,7 +2767,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) case 2: red_icon = "flag_red_lost"; break; case 3: red_icon = "flag_red_carrying"; red_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; default: - if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_2)) + if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_2)) red_icon = "flag_red_shielded"; else red_icon = string_null; @@ -2780,7 +2780,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) default: if(redflag == 3) red_icon_prevstatus = "flag_red_carrying"; // make it more visible - else if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_2)) + else if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_2)) red_icon_prevstatus = "flag_red_shielded"; else red_icon_prevstatus = string_null; @@ -2795,7 +2795,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) case 2: blue_icon = "flag_blue_lost"; break; case 3: blue_icon = "flag_blue_carrying"; blue_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break; default: - if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_1)) + if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_1)) blue_icon = "flag_blue_shielded"; else blue_icon = string_null; @@ -2808,7 +2808,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) default: if(blueflag == 3) blue_icon_prevstatus = "flag_blue_carrying"; // make it more visible - else if((stat_items & IT_CTF_SHIELDED) && (myteam == FL_TEAM_1)) + else if((stat_items & IT_CTF_SHIELDED) && (myteam == NUM_TEAM_1)) blue_icon_prevstatus = "flag_blue_shielded"; else blue_icon_prevstatus = string_null; @@ -2816,7 +2816,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) } if(mySize_x > mySize_y) { - if (myteam == FL_TEAM_1) { // always draw own flag on left + if (myteam == NUM_TEAM_1) { // always draw own flag on left redflag_pos = pos; blueflag_pos = pos + eX * 0.5 * mySize_x; } else { @@ -2825,7 +2825,7 @@ void HUD_Mod_CTF(vector pos, vector mySize) } flag_size = eX * 0.5 * mySize_x + eY * mySize_y; } else { - if (myteam == FL_TEAM_1) { // always draw own flag on left + if (myteam == NUM_TEAM_1) { // always draw own flag on left redflag_pos = pos; blueflag_pos = pos + eY * 0.5 * mySize_y; } else { @@ -2939,16 +2939,16 @@ void HUD_Mod_KH(vector pos, vector mySize) { switch(keyteam) { - case FL_TEAM_1: + case NUM_TEAM_1: drawpic_aspect_skin(pa, "kh_redarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% theAlpha key break; - case FL_TEAM_2: + case NUM_TEAM_2: drawpic_aspect_skin(pa, "kh_bluearrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% theAlpha key break; - case FL_TEAM_3: + case NUM_TEAM_3: drawpic_aspect_skin(pa, "kh_yellowarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% theAlpha key break; - case FL_TEAM_4: + case NUM_TEAM_4: drawpic_aspect_skin(pa, "kh_pinkarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% theAlpha key break; default: diff --git a/qcsrc/client/tturrets.qc b/qcsrc/client/tturrets.qc index 6ac004c7b..24deed681 100644 --- a/qcsrc/client/tturrets.qc +++ b/qcsrc/client/tturrets.qc @@ -163,22 +163,22 @@ void turret_changeteam() { switch(self.team - 1) { - case FL_TEAM_1: // Red + case NUM_TEAM_1: // Red self.glowmod = '2 0 0'; self.teamradar_color = '1 0 0'; break; - case FL_TEAM_2: // Blue + case NUM_TEAM_2: // Blue self.glowmod = '0 0 2'; self.teamradar_color = '0 0 1'; break; - case FL_TEAM_3: // Yellow + case NUM_TEAM_3: // Yellow self.glowmod = '1 1 0'; self.teamradar_color = '1 1 0'; break; - case FL_TEAM_4: // Pink + case NUM_TEAM_4: // Pink self.glowmod = '1 0 1'; self.teamradar_color = '1 0 1'; break; diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index a1b05494c..bfafcb3b9 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -171,13 +171,13 @@ void Send_Notification_WOVA( */ #define MULTITEAM_INFO(default,prefix,teams,strnum,flnum,args,hudargs,icon,normal,gentle) \ - MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(STR_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(STR_TEAM_1))) \ - MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(STR_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(STR_TEAM_2))) \ + MSG_INFO_NOTIF(default, prefix##RED, strnum, flnum, args, hudargs, sprintf(icon, strtolower(NAME_TEAM_1)), TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \ + MSG_INFO_NOTIF(default, prefix##BLUE, strnum, flnum, args, hudargs, sprintf(icon, strtolower(NAME_TEAM_2)), TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \ #if teams >= 3 \ - MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(STR_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(STR_TEAM_3))) \ + MSG_INFO_NOTIF(default, prefix##YELLOW, strnum, flnum, args, hudargs, sprintf(icon, strtolower(NAME_TEAM_3)), TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \ #endif \ #if teams >= 4 \ - MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(STR_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \ + MSG_INFO_NOTIF(default, prefix##PINK, strnum, flnum, args, hudargs, sprintf(icon, strtolower(NAME_TEAM_4)), TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \ #endif #define MSG_INFO_NOTIFICATIONS \ MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 2, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag\n"), "") \ @@ -353,13 +353,13 @@ void Send_Notification_WOVA( MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "weaponuzi", _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s\n"), "") #define MULTITEAM_CENTER(default,prefix,teams,strnum,flnum,args,cpid,durcnt,normal,gentle) \ - MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(STR_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(STR_TEAM_1))) \ - MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(STR_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(STR_TEAM_2))) \ + MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \ + MSG_CENTER_NOTIF(default, prefix##BLUE, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_2, strtoupper(NAME_TEAM_2)), TCR(gentle, COL_TEAM_2, strtoupper(NAME_TEAM_2))) \ #if teams >= 3 \ - MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(STR_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(STR_TEAM_3))) \ + MSG_CENTER_NOTIF(default, prefix##YELLOW, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_3, strtoupper(NAME_TEAM_3)), TCR(gentle, COL_TEAM_3, strtoupper(NAME_TEAM_3))) \ #endif \ #if teams >= 4 \ - MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(STR_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(STR_TEAM_4))) \ + MSG_CENTER_NOTIF(default, prefix##PINK, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_4, strtoupper(NAME_TEAM_4)), TCR(gentle, COL_TEAM_4, strtoupper(NAME_TEAM_4))) \ #endif #define MSG_CENTER_NOTIFICATIONS \ MSG_CENTER_NOTIF(1, CENTER_ARENA_BEGIN, 0, 0, "", CPID_ARENA, "2 0", _("^F4Begin!"), "") \ diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh index c15f461af..44e4cc3e1 100644 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@ -1,20 +1,20 @@ #ifdef TEAMNUMBERS_THAT_ARENT_STUPID -const float FL_TEAM_1 = 1; // red -const float FL_TEAM_2 = 2; // blue -const float FL_TEAM_3 = 3; // yellow -const float FL_TEAM_4 = 4; // pink +const float NUM_TEAM_1 = 1; // red +const float NUM_TEAM_2 = 2; // blue +const float NUM_TEAM_3 = 3; // yellow +const float NUM_TEAM_4 = 4; // pink const float FL_SPECTATOR = 5; #else #ifdef CSQC -const float FL_TEAM_1 = 4; // red -const float FL_TEAM_2 = 13; // blue -const float FL_TEAM_3 = 12; // yellow -const float FL_TEAM_4 = 9; // pink +const float NUM_TEAM_1 = 4; // red +const float NUM_TEAM_2 = 13; // blue +const float NUM_TEAM_3 = 12; // yellow +const float NUM_TEAM_4 = 9; // pink #else -const float FL_TEAM_1 = 5; // red -const float FL_TEAM_2 = 14; // blue -const float FL_TEAM_3 = 13; // yellow -const float FL_TEAM_4 = 10; // pink +const float NUM_TEAM_1 = 5; // red +const float NUM_TEAM_2 = 14; // blue +const float NUM_TEAM_3 = 13; // yellow +const float NUM_TEAM_4 = 10; // pink #endif const float FL_SPECTATOR = 1337; #endif @@ -23,17 +23,17 @@ const string COL_TEAM_1 = "^1"; const string COL_TEAM_2 = "^4"; const string COL_TEAM_3 = "^3"; const string COL_TEAM_4 = "^6"; -const string STR_TEAM_1 = _("Red"); -const string STR_TEAM_2 = _("Blue"); -const string STR_TEAM_3 = _("Yellow"); -const string STR_TEAM_4 = _("Pink"); -const string STR_TEAM = _("Team"); -const string STR_NEUTRAL = _("Neutral"); - -#define APP_TEAM_NUM_2(num,prefix) ((num == FL_TEAM_1) ? prefix##RED : prefix##BLUE) -#define APP_TEAM_NUM_4(num,prefix) ((num == FL_TEAM_1) ? prefix##RED : ((num == FL_TEAM_2) ? prefix##BLUE : ((num == FL_TEAM_3) ? prefix##YELLOW : prefix##PINK))) -#define APP_TEAM_ENT_2(ent,prefix) ((ent.team == FL_TEAM_1) ? prefix##RED : prefix##BLUE) -#define APP_TEAM_ENT_4(ent,prefix) ((ent.team == FL_TEAM_1) ? prefix##RED : ((ent.team == FL_TEAM_2) ? prefix##BLUE : ((ent.team == FL_TEAM_3) ? prefix##YELLOW : prefix##PINK))) +const string NAME_TEAM_1 = _("Red"); +const string NAME_TEAM_2 = _("Blue"); +const string NAME_TEAM_3 = _("Yellow"); +const string NAME_TEAM_4 = _("Pink"); +const string NAME_TEAM = _("Team"); +const string NAME_NEUTRAL = _("Neutral"); + +#define APP_TEAM_NUM_2(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : prefix##BLUE) +#define APP_TEAM_NUM_4(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : ((num == NUM_TEAM_2) ? prefix##BLUE : ((num == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK))) +#define APP_TEAM_ENT_2(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : prefix##BLUE) +#define APP_TEAM_ENT_4(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : ((ent.team == NUM_TEAM_2) ? prefix##BLUE : ((ent.team == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK))) #ifdef CSQC float teamplay; @@ -44,10 +44,10 @@ string Team_ColorCode(float teamid) { switch(teamid) { - case FL_TEAM_1: return COL_TEAM_1; - case FL_TEAM_2: return COL_TEAM_2; - case FL_TEAM_3: return COL_TEAM_3; - case FL_TEAM_4: return COL_TEAM_4; + case NUM_TEAM_1: return COL_TEAM_1; + case NUM_TEAM_2: return COL_TEAM_2; + case NUM_TEAM_3: return COL_TEAM_3; + case NUM_TEAM_4: return COL_TEAM_4; } return "^7"; @@ -58,15 +58,15 @@ vector Team_ColorRGB(float teamid) switch(teamid) { #ifdef TEAMNUMBERS_THAT_ARENT_STUPID - case FL_TEAM_1: return '1 0 0'; // red - case FL_TEAM_2: return '0 0 1'; // blue - case FL_TEAM_3: return '1 1 0'; // yellow - case FL_TEAM_4: return '1 0 1'; // pink + case NUM_TEAM_1: return '1 0 0'; // red + case NUM_TEAM_2: return '0 0 1'; // blue + case NUM_TEAM_3: return '1 1 0'; // yellow + case NUM_TEAM_4: return '1 0 1'; // pink #else - case FL_TEAM_1: return '1 0.0625 0.0625'; - case FL_TEAM_2: return '0.0625 0.0625 1'; - case FL_TEAM_3: return '1 1 0.0625'; - case FL_TEAM_4: return '1 0.0625 1'; + case NUM_TEAM_1: return '1 0.0625 0.0625'; + case NUM_TEAM_2: return '0.0625 0.0625 1'; + case NUM_TEAM_3: return '1 1 0.0625'; + case NUM_TEAM_4: return '1 0.0625 1'; #endif } @@ -77,23 +77,23 @@ string Team_ColorName(float teamid) { switch(teamid) { - case FL_TEAM_1: return STR_TEAM_1; - case FL_TEAM_2: return STR_TEAM_2; - case FL_TEAM_3: return STR_TEAM_3; - case FL_TEAM_4: return STR_TEAM_4; + case NUM_TEAM_1: return NAME_TEAM_1; + case NUM_TEAM_2: return NAME_TEAM_2; + case NUM_TEAM_3: return NAME_TEAM_3; + case NUM_TEAM_4: return NAME_TEAM_4; } - return STR_NEUTRAL; + return NAME_NEUTRAL; } float Team_ColorToTeam(string team_color) { switch(strtolower(team_color)) { - case "red": return FL_TEAM_1; - case "blue": return FL_TEAM_2; - case "yellow": return FL_TEAM_3; - case "pink": return FL_TEAM_4; + case "red": return NUM_TEAM_1; + case "blue": return NUM_TEAM_2; + case "yellow": return NUM_TEAM_3; + case "pink": return NUM_TEAM_4; case "auto": return 0; } @@ -104,10 +104,10 @@ float Team_NumberToTeam(float number) { switch(number) { - case 1: return FL_TEAM_1; - case 2: return FL_TEAM_2; - case 3: return FL_TEAM_3; - case 4: return FL_TEAM_4; + case 1: return NUM_TEAM_1; + case 2: return NUM_TEAM_2; + case 3: return NUM_TEAM_3; + case 4: return NUM_TEAM_4; } return -1; @@ -117,10 +117,10 @@ float Team_TeamToNumber(float teamid) { switch(teamid) { - case FL_TEAM_1: return 1; - case FL_TEAM_2: return 2; - case FL_TEAM_3: return 3; - case FL_TEAM_4: return 4; + case NUM_TEAM_1: return 1; + case NUM_TEAM_2: return 2; + case NUM_TEAM_3: return 3; + case NUM_TEAM_4: return 4; } return -1; @@ -135,8 +135,8 @@ float Team_TeamToNumber(float teamid) #define Team_ColorName_Lower(teamid) strtolower(Team_ColorName(teamid)) #define Team_ColorName_Upper(teamid) strtoupper(Team_ColorName(teamid)) -#define Team_FullName(teamid) strcat(Team_ColorName(teamid), " ", STR_TEAM, "^7") -#define Team_ColoredFullName(teamid) strcat(Team_ColorCode(teamid), Team_ColorName(teamid), " ", STR_TEAM, "^7") +#define Team_FullName(teamid) strcat(Team_ColorName(teamid), " ", NAME_TEAM, "^7") +#define Team_ColoredFullName(teamid) strcat(Team_ColorCode(teamid), Team_ColorName(teamid), " ", NAME_TEAM, "^7") #define Team_NumberToFullName(number) Team_FullName(Team_NumberToTeam(number)) #define Team_NumberToColoredFullName(number) Team_ColoredFullName(Team_NumberToTeam(number)) diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index 636b0668d..7b2d71583 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -289,22 +289,22 @@ void count_players() // count amount of players in each team total_players = red_players = blue_players = yellow_players = pink_players = 0; FOR_EACH_PLAYER(self) { - if (self.team == FL_TEAM_1) + if (self.team == NUM_TEAM_1) { red_players += 1; total_players += 1; } - else if (self.team == FL_TEAM_2) + else if (self.team == NUM_TEAM_2) { blue_players += 1; total_players += 1; } - else if (self.team == FL_TEAM_3) + else if (self.team == NUM_TEAM_3) { yellow_players += 1; total_players += 1; } - else if (self.team == FL_TEAM_4) + else if (self.team == NUM_TEAM_4) { pink_players += 1; total_players += 1; @@ -318,12 +318,12 @@ void count_alive_players() if(g_ca) { FOR_EACH_PLAYER(self) { - if (self.team == FL_TEAM_1 && self.health >= 1) + if (self.team == NUM_TEAM_1 && self.health >= 1) { redalive += 1; totalalive += 1; } - else if (self.team == FL_TEAM_2 && self.health >= 1) + else if (self.team == NUM_TEAM_2 && self.health >= 1) { bluealive += 1; totalalive += 1; @@ -338,22 +338,22 @@ void count_alive_players() { // count amount of alive players in each team FOR_EACH_PLAYER(self) { - if (self.team == FL_TEAM_1 && self.freezetag_frozen == 0 && self.health >= 1) + if (self.team == NUM_TEAM_1 && self.freezetag_frozen == 0 && self.health >= 1) { redalive += 1; totalalive += 1; } - else if (self.team == FL_TEAM_2 && self.freezetag_frozen == 0 && self.health >= 1) + else if (self.team == NUM_TEAM_2 && self.freezetag_frozen == 0 && self.health >= 1) { bluealive += 1; totalalive += 1; } - else if (self.team == FL_TEAM_3 && self.freezetag_frozen == 0 && self.health >= 1) + else if (self.team == NUM_TEAM_3 && self.freezetag_frozen == 0 && self.health >= 1) { yellowalive += 1; totalalive += 1; } - else if (self.team == FL_TEAM_4 && self.freezetag_frozen == 0 && self.health >= 1) + else if (self.team == NUM_TEAM_4 && self.freezetag_frozen == 0 && self.health >= 1) { pinkalive += 1; totalalive += 1; @@ -396,12 +396,12 @@ void Spawnqueue_Check() if(redalive) { play2all("ctf/red_capture.wav"); FOR_EACH_CLIENT(self) centerprint(self, "^1RED ^7team wins the round"); - TeamScore_AddToTeam(FL_TEAM_1, ST_SCORE, +1); + TeamScore_AddToTeam(NUM_TEAM_1, ST_SCORE, +1); } else if(bluealive) { play2all("ctf/blue_capture.wav"); FOR_EACH_CLIENT(self) centerprint(self, "^4BLUE ^7team wins the round"); - TeamScore_AddToTeam(FL_TEAM_2, ST_SCORE, +1); + TeamScore_AddToTeam(NUM_TEAM_2, ST_SCORE, +1); } else FOR_EACH_CLIENT(self) centerprint(self, "^7Round tied"); diff --git a/qcsrc/server/assault.qc b/qcsrc/server/assault.qc index b4ac4a1ee..7a5662c97 100644 --- a/qcsrc/server/assault.qc +++ b/qcsrc/server/assault.qc @@ -9,7 +9,7 @@ void spawnfunc_info_player_attacker() { remove(self); return; } - self.team = FL_TEAM_1; // red, gets swapped every round + self.team = NUM_TEAM_1; // red, gets swapped every round spawnfunc_info_player_deathmatch(); } @@ -19,7 +19,7 @@ void spawnfunc_info_player_defender() { remove(self); return; } - self.team = FL_TEAM_2; // blue, gets swapped every round + self.team = NUM_TEAM_2; // blue, gets swapped every round spawnfunc_info_player_deathmatch(); } @@ -216,10 +216,10 @@ void spawnfunc_func_assault_destructible() { } self.spawnflags = 3; self.classname = "func_assault_destructible"; - if(assault_attacker_team == FL_TEAM_1) { - self.team = FL_TEAM_2; + if(assault_attacker_team == NUM_TEAM_1) { + self.team = NUM_TEAM_2; } else { - self.team = FL_TEAM_1; + self.team = NUM_TEAM_1; } spawnfunc_func_breakable(); } @@ -289,10 +289,10 @@ void assault_roundstart_use() { ent = find(world, classname, "turret_main"); while(ent) { // Swap turret teams - if(ent.team == FL_TEAM_1) - ent.team = FL_TEAM_2; + if(ent.team == NUM_TEAM_1) + ent.team = NUM_TEAM_2; else - ent.team = FL_TEAM_1; + ent.team = NUM_TEAM_1; self = ent; @@ -313,7 +313,7 @@ void spawnfunc_target_assault_roundstart() { remove(self); return; } - assault_attacker_team = FL_TEAM_1; + assault_attacker_team = NUM_TEAM_1; self.classname = "target_assault_roundstart"; self.use = assault_roundstart_use; self.reset2 = assault_roundstart_use; @@ -351,10 +351,10 @@ void assault_new_round() self.winning = self.winning + 1; // swap attacker/defender roles - if(assault_attacker_team == FL_TEAM_1) { - assault_attacker_team = FL_TEAM_2; + if(assault_attacker_team == NUM_TEAM_1) { + assault_attacker_team = NUM_TEAM_2; } else { - assault_attacker_team = FL_TEAM_1; + assault_attacker_team = NUM_TEAM_1; } @@ -363,10 +363,10 @@ void assault_new_round() { if(clienttype(ent) == CLIENTTYPE_NOTACLIENT) { - if(ent.team_saved == FL_TEAM_1) - ent.team_saved = FL_TEAM_2; - else if(ent.team_saved == FL_TEAM_2) - ent.team_saved = FL_TEAM_1; + if(ent.team_saved == NUM_TEAM_1) + ent.team_saved = NUM_TEAM_2; + else if(ent.team_saved == NUM_TEAM_2) + ent.team_saved = NUM_TEAM_1; } } diff --git a/qcsrc/server/attic/ctf.qc b/qcsrc/server/attic/ctf.qc index 9d514da5a..b86e84369 100644 --- a/qcsrc/server/attic/ctf.qc +++ b/qcsrc/server/attic/ctf.qc @@ -127,10 +127,10 @@ void ctf_flag_spawnstuff() self.nearestwaypointtimeout = 0; // activate waypointing again self.basewaypoint = self.nearestwaypoint; - if(self.team == FL_TEAM_1) - WaypointSprite_SpawnFixed("redbase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(FL_TEAM_1 - 1, FALSE)); + if(self.team == NUM_TEAM_1) + WaypointSprite_SpawnFixed("redbase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(NUM_TEAM_1 - 1, FALSE)); else - WaypointSprite_SpawnFixed("bluebase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(FL_TEAM_2 - 1, FALSE)); + WaypointSprite_SpawnFixed("bluebase", self.origin + '0 0 61', self, sprite, RADARICON_FLAG, colormapPaletteColor(NUM_TEAM_2 - 1, FALSE)); } float ctf_score_value(string parameter) @@ -290,7 +290,7 @@ void DropFlag(entity e, entity penalty_receiver, entity attacker) ctf_captureshield_update(p, 0); // shield only e.playerid = attacker.playerid; e.ctf_droptime = time; - WaypointSprite_Spawn("flagdropped", 0, 0, e, '0 0 1' * 61, world, FL_TEAM_1 + FL_TEAM_2 - e.team, e, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1'); + WaypointSprite_Spawn("flagdropped", 0, 0, e, '0 0 1' * 61, world, NUM_TEAM_1 + NUM_TEAM_2 - e.team, e, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1'); WaypointSprite_Ping(e.waypointsprite_attachedforcarrier); if(p.waypointsprite_attachedforcarrier) @@ -494,11 +494,11 @@ void FlagTouch() UpdateFrags(other, ctf_score_value("score_capture")); if (autocvar_g_ctf_flag_capture_effects) { - if (other.team == FL_TEAM_1) { // red team scores effect + if (other.team == NUM_TEAM_1) { // red team scores effect pointparticles(particleeffectnum("red_ground_quake"), self.origin, '0 0 0', 1); flag_cap_ring_spawn(self.origin); } - if (other.team == FL_TEAM_2) { // blue team scores effect + if (other.team == NUM_TEAM_2) { // blue team scores effect pointparticles(particleeffectnum("blue_ground_quake"), self.origin, '0 0 0', 1); flag_cap_ring_spawn(self.origin); } @@ -513,7 +513,7 @@ void FlagTouch() other.next_take_time = time + 1; } if (self.cnt == FLAG_BASE) - if (other.team == FL_TEAM_1 || other.team == FL_TEAM_2) // only red and blue team can steal flags + if (other.team == NUM_TEAM_1 || other.team == NUM_TEAM_2) // only red and blue team can steal flags if (other.team != self.team) if (!other.flagcarried) if (!other.ctf_captureshielded) @@ -563,7 +563,7 @@ void FlagTouch() if (self.cnt == FLAG_DROPPED) { self.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND and any other junk - if (other.team == self.team || (other.team != FL_TEAM_1 && other.team != FL_TEAM_2)) + if (other.team == self.team || (other.team != NUM_TEAM_1 && other.team != NUM_TEAM_2)) { // return flag Send_KillNotification (other.netname, self.netname, "", INFO_RETURNFLAG, MSG_INFO); @@ -578,22 +578,22 @@ void FlagTouch() } // punish the team who was last carrying it - if(self.team == FL_TEAM_1) - TeamScore_AddToTeam(FL_TEAM_2, ST_SCORE, -ctf_score_value("penalty_returned")); + if(self.team == NUM_TEAM_1) + TeamScore_AddToTeam(NUM_TEAM_2, ST_SCORE, -ctf_score_value("penalty_returned")); else - TeamScore_AddToTeam(FL_TEAM_1, ST_SCORE, -ctf_score_value("penalty_returned")); + TeamScore_AddToTeam(NUM_TEAM_1, ST_SCORE, -ctf_score_value("penalty_returned")); // reward the player who returned it if(other.playerid == self.playerid) // is this the guy who killed the FC last? { - if (other.team == FL_TEAM_1 || other.team == FL_TEAM_2) + if (other.team == NUM_TEAM_1 || other.team == NUM_TEAM_2) UpdateFrags(other, ctf_score_value("score_return_by_killer")); else UpdateFrags(other, ctf_score_value("score_return_rogue_by_killer")); } else { - if (other.team == FL_TEAM_1 || other.team == FL_TEAM_2) + if (other.team == NUM_TEAM_1 || other.team == NUM_TEAM_2) UpdateFrags(other, ctf_score_value("score_return")); else UpdateFrags(other, ctf_score_value("score_return_rogue")); @@ -663,7 +663,7 @@ void spawnfunc_info_player_team1() remove(self); return; } - self.team = FL_TEAM_1; // red + self.team = NUM_TEAM_1; // red spawnfunc_info_player_deathmatch(); } //self.team = 4;self.classname = "info_player_start";spawnfunc_info_player_start();} @@ -683,7 +683,7 @@ void spawnfunc_info_player_team2() remove(self); return; } - self.team = FL_TEAM_2; // blue + self.team = NUM_TEAM_2; // blue spawnfunc_info_player_deathmatch(); } //self.team = 13;self.classname = "info_player_start";spawnfunc_info_player_start();} @@ -703,7 +703,7 @@ void spawnfunc_info_player_team3() remove(self); return; } - self.team = FL_TEAM_3; // yellow + self.team = NUM_TEAM_3; // yellow spawnfunc_info_player_deathmatch(); } @@ -723,7 +723,7 @@ void spawnfunc_info_player_team4() remove(self); return; } - self.team = FL_TEAM_4; // purple + self.team = NUM_TEAM_4; // purple spawnfunc_info_player_deathmatch(); } @@ -741,11 +741,11 @@ void item_flag_postspawn() // Flag Glow Trail Support if(autocvar_g_ctf_flag_glowtrails) { // Provide Flag Glow Trail - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) // Red self.glow_color = 251; else - if(self.team == FL_TEAM_2) + if(self.team == NUM_TEAM_2) // Blue self.glow_color = 210; @@ -802,7 +802,7 @@ void spawnfunc_item_flag_team1() ctf_worldflaglist = self; self.classname = "item_flag_team"; - self.team = FL_TEAM_1; // color 4 team (red) + self.team = NUM_TEAM_1; // color 4 team (red) self.items = IT_KEY2; // gold key (redish enough) self.netname = "^1RED^7 flag"; self.target = "###item###"; @@ -901,7 +901,7 @@ void spawnfunc_item_flag_team2() ctf_worldflaglist = self; self.classname = "item_flag_team"; - self.team = FL_TEAM_2; // color 13 team (blue) + self.team = NUM_TEAM_2; // color 13 team (blue) self.items = IT_KEY1; // silver key (bluish enough) self.netname = "^4BLUE^7 flag"; self.target = "###item###"; @@ -1002,8 +1002,8 @@ void ctf_spawnteams() numteams = 2;//cvar("g_ctf_default_teams"); - ctf_spawnteam("Red", FL_TEAM_1 - 1); - ctf_spawnteam("Blue", FL_TEAM_2 - 1); + ctf_spawnteam("Red", NUM_TEAM_1 - 1); + ctf_spawnteam("Blue", NUM_TEAM_2 - 1); } void ctf_delayedinit() @@ -1089,7 +1089,7 @@ void ctf_setstatus() entity ctf_team_has_commander(float cteam) { entity pl; - if(cteam != FL_TEAM_1 || cteam != FL_TEAM_2) + if(cteam != NUM_TEAM_1 || cteam != NUM_TEAM_2) return world; FOR_EACH_REALPLAYER(pl) { diff --git a/qcsrc/server/attic/domination.qc b/qcsrc/server/attic/domination.qc index e0bad53d3..a898b53e9 100644 --- a/qcsrc/server/attic/domination.qc +++ b/qcsrc/server/attic/domination.qc @@ -131,16 +131,16 @@ void dompoint_captured () switch(self.goalentity.team) { - case FL_TEAM_1: + case NUM_TEAM_1: WaypointSprite_UpdateSprites(self.sprite, "dom-red", "", ""); break; - case FL_TEAM_2: + case NUM_TEAM_2: WaypointSprite_UpdateSprites(self.sprite, "dom-blue", "", ""); break; - case FL_TEAM_3: + case NUM_TEAM_3: WaypointSprite_UpdateSprites(self.sprite, "dom-yellow", "", ""); break; - case FL_TEAM_4: + case NUM_TEAM_4: WaypointSprite_UpdateSprites(self.sprite, "dom-pink", "", ""); } @@ -157,16 +157,16 @@ void dompoint_captured () wait_time = head.wait; switch(head.goalentity.team) { - case FL_TEAM_1: + case NUM_TEAM_1: pps_red += points/wait_time; break; - case FL_TEAM_2: + case NUM_TEAM_2: pps_blue += points/wait_time; break; - case FL_TEAM_3: + case NUM_TEAM_3: pps_yellow += points/wait_time; break; - case FL_TEAM_4: + case NUM_TEAM_4: pps_pink += points/wait_time; } total_pps += points/wait_time; @@ -469,12 +469,12 @@ void dom_spawnteams() else numteams = autocvar_g_domination_teams_override; // LordHavoc: edit this if you want to change defaults - dom_spawnteam("Red", FL_TEAM_1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point"); - dom_spawnteam("Blue", FL_TEAM_2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point"); + dom_spawnteam("Red", NUM_TEAM_1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point"); + dom_spawnteam("Blue", NUM_TEAM_2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point"); if(numteams > 2) - dom_spawnteam("Yellow", FL_TEAM_3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point"); + dom_spawnteam("Yellow", NUM_TEAM_3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point"); if(numteams > 3) - dom_spawnteam("Pink", FL_TEAM_4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point"); + dom_spawnteam("Pink", NUM_TEAM_4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point"); dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, "", "", ""); } diff --git a/qcsrc/server/attic/nexball.qc b/qcsrc/server/attic/nexball.qc index 6f2674261..dc9c91ce6 100644 --- a/qcsrc/server/attic/nexball.qc +++ b/qcsrc/server/attic/nexball.qc @@ -427,10 +427,10 @@ void nb_spawnteams (void) { switch(e.team) { - case FL_TEAM_1: if(!t_r) { nb_spawnteam ("Red", e.team-1) ; t_r = 1; } break; - case FL_TEAM_2: if(!t_b) { nb_spawnteam ("Blue", e.team-1) ; t_b = 1; } break; - case FL_TEAM_3: if(!t_y) { nb_spawnteam ("Yellow", e.team-1); t_y = 1; } break; - case FL_TEAM_4: if(!t_p) { nb_spawnteam ("Pink", e.team-1) ; t_p = 1; } break; + case NUM_TEAM_1: if(!t_r) { nb_spawnteam ("Red", e.team-1) ; t_r = 1; } break; + case NUM_TEAM_2: if(!t_b) { nb_spawnteam ("Blue", e.team-1) ; t_b = 1; } break; + case NUM_TEAM_3: if(!t_y) { nb_spawnteam ("Yellow", e.team-1); t_y = 1; } break; + case NUM_TEAM_4: if(!t_p) { nb_spawnteam ("Pink", e.team-1) ; t_p = 1; } break; } } } @@ -541,22 +541,22 @@ void SpawnGoal (void) void spawnfunc_nexball_redgoal (void) { - self.team = FL_TEAM_1; + self.team = NUM_TEAM_1; SpawnGoal(); } void spawnfunc_nexball_bluegoal (void) { - self.team = FL_TEAM_2; + self.team = NUM_TEAM_2; SpawnGoal(); } void spawnfunc_nexball_yellowgoal (void) { - self.team = FL_TEAM_3; + self.team = NUM_TEAM_3; SpawnGoal(); } void spawnfunc_nexball_pinkgoal (void) { - self.team = FL_TEAM_4; + self.team = NUM_TEAM_4; SpawnGoal(); } diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index b2e20e776..d87c72695 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -398,13 +398,13 @@ void bot_clientconnect() bot_setnameandstuff(); if(self.bot_forced_team==1) - self.team = FL_TEAM_1; + self.team = NUM_TEAM_1; else if(self.bot_forced_team==2) - self.team = FL_TEAM_2; + self.team = NUM_TEAM_2; else if(self.bot_forced_team==3) - self.team = FL_TEAM_3; + self.team = NUM_TEAM_3; else if(self.bot_forced_team==4) - self.team = FL_TEAM_4; + self.team = NUM_TEAM_4; else JoinBestTeam(self, FALSE, TRUE); @@ -425,13 +425,13 @@ void bot_removefromlargestteam() bestcount = 0; while (head) { - if(head.team == FL_TEAM_1) + if(head.team == NUM_TEAM_1) thiscount = c1; - else if(head.team == FL_TEAM_2) + else if(head.team == NUM_TEAM_2) thiscount = c2; - else if(head.team == FL_TEAM_3) + else if(head.team == NUM_TEAM_3) thiscount = c3; - else if(head.team == FL_TEAM_4) + else if(head.team == NUM_TEAM_4) thiscount = c4; else thiscount = 0; diff --git a/qcsrc/server/bot/havocbot/role_onslaught.qc b/qcsrc/server/bot/havocbot/role_onslaught.qc index f50a87fc7..8071fef74 100644 --- a/qcsrc/server/bot/havocbot/role_onslaught.qc +++ b/qcsrc/server/bot/havocbot/role_onslaught.qc @@ -127,12 +127,12 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) continue; // Ignore owned controlpoints - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) { if( (cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) && !(cp2.isgenneighbor_red || cp2.iscpneighbor_red) ) continue; } - else if(self.team == FL_TEAM_2) + else if(self.team == NUM_TEAM_2) { if( (cp2.isgenneighbor_red || cp2.iscpneighbor_red) && !(cp2.isgenneighbor_blue || cp2.iscpneighbor_blue) ) continue; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 9df2026e7..4e4ea34de 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1400,30 +1400,30 @@ void ClientConnect (void) { switch(autocvar_g_campaign_forceteam) { - case 1: self.team_forced = FL_TEAM_1; break; - case 2: self.team_forced = FL_TEAM_2; break; - case 3: self.team_forced = FL_TEAM_3; break; - case 4: self.team_forced = FL_TEAM_4; break; + case 1: self.team_forced = NUM_TEAM_1; break; + case 2: self.team_forced = NUM_TEAM_2; break; + case 3: self.team_forced = NUM_TEAM_3; break; + case 4: self.team_forced = NUM_TEAM_4; break; default: self.team_forced = 0; } } } else if(PlayerInIDList(self, autocvar_g_forced_team_red)) - self.team_forced = FL_TEAM_1; + self.team_forced = NUM_TEAM_1; else if(PlayerInIDList(self, autocvar_g_forced_team_blue)) - self.team_forced = FL_TEAM_2; + self.team_forced = NUM_TEAM_2; else if(PlayerInIDList(self, autocvar_g_forced_team_yellow)) - self.team_forced = FL_TEAM_3; + self.team_forced = NUM_TEAM_3; else if(PlayerInIDList(self, autocvar_g_forced_team_pink)) - self.team_forced = FL_TEAM_4; + self.team_forced = NUM_TEAM_4; else if(autocvar_g_forced_team_otherwise == "red") - self.team_forced = FL_TEAM_1; + self.team_forced = NUM_TEAM_1; else if(autocvar_g_forced_team_otherwise == "blue") - self.team_forced = FL_TEAM_2; + self.team_forced = NUM_TEAM_2; else if(autocvar_g_forced_team_otherwise == "yellow") - self.team_forced = FL_TEAM_3; + self.team_forced = NUM_TEAM_3; else if(autocvar_g_forced_team_otherwise == "pink") - self.team_forced = FL_TEAM_4; + self.team_forced = NUM_TEAM_4; else if(autocvar_g_forced_team_otherwise == "spectate") self.team_forced = -1; else if(autocvar_g_forced_team_otherwise == "spectator") diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 9c4433ccb..36567b498 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -284,10 +284,10 @@ void ClientCommand_selectteam(float request, float argc) switch(argv(1)) { - case "red": selection = FL_TEAM_1; break; - case "blue": selection = FL_TEAM_2; break; - case "yellow": selection = FL_TEAM_3; break; - case "pink": selection = FL_TEAM_4; break; + case "red": selection = NUM_TEAM_1; break; + case "blue": selection = NUM_TEAM_2; break; + case "yellow": selection = NUM_TEAM_3; break; + case "pink": selection = NUM_TEAM_4; break; case "auto": selection = (-1); break; default: selection = 0; break; diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index b47197fe0..0944f04fb 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1041,10 +1041,10 @@ void GameCommand_moveplayer(float request, float argc) // Check to see if the destination team is even available switch(team_id) { - case FL_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break; - case FL_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break; - case FL_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break; - case FL_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break; + case NUM_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break; + case NUM_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break; + case NUM_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break; + case NUM_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break; default: print("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return; } diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 7f217bc0d..894ffd615 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1749,10 +1749,10 @@ float WinningCondition_Onslaught() { if (head.health > 0) { - if (head.team == FL_TEAM_1) t1 = 1; - if (head.team == FL_TEAM_2) t2 = 1; - if (head.team == FL_TEAM_3) t3 = 1; - if (head.team == FL_TEAM_4) t4 = 1; + if (head.team == NUM_TEAM_1) t1 = 1; + if (head.team == NUM_TEAM_2) t2 = 1; + if (head.team == NUM_TEAM_3) t3 = 1; + if (head.team == NUM_TEAM_4) t4 = 1; } head = find(head, classname, "onslaught_generator"); } @@ -1760,10 +1760,10 @@ float WinningCondition_Onslaught() { // game over, only one team remains (or none) ClearWinners(); - if (t1) SetWinners(team, FL_TEAM_1); - if (t2) SetWinners(team, FL_TEAM_2); - if (t3) SetWinners(team, FL_TEAM_3); - if (t4) SetWinners(team, FL_TEAM_4); + if (t1) SetWinners(team, NUM_TEAM_1); + if (t2) SetWinners(team, NUM_TEAM_2); + if (t3) SetWinners(team, NUM_TEAM_3); + if (t4) SetWinners(team, NUM_TEAM_4); dprint("Have a winner, ending game.\n"); return WINNING_YES; } @@ -1801,13 +1801,13 @@ float WinningCondition_Assault() status = WINNING_NO; // as the timelimit has not yet passed just assume the defending team will win - if(assault_attacker_team == FL_TEAM_1) + if(assault_attacker_team == NUM_TEAM_1) { - SetWinners(team, FL_TEAM_2); + SetWinners(team, NUM_TEAM_2); } else { - SetWinners(team, FL_TEAM_1); + SetWinners(team, NUM_TEAM_1); } entity ent; @@ -1933,10 +1933,10 @@ float WinningCondition_Scores(float limit, float leadlimit) if(teamplay) { - team1_score = TeamScore_GetCompareValue(FL_TEAM_1); - team2_score = TeamScore_GetCompareValue(FL_TEAM_2); - team3_score = TeamScore_GetCompareValue(FL_TEAM_3); - team4_score = TeamScore_GetCompareValue(FL_TEAM_4); + team1_score = TeamScore_GetCompareValue(NUM_TEAM_1); + team2_score = TeamScore_GetCompareValue(NUM_TEAM_2); + team3_score = TeamScore_GetCompareValue(NUM_TEAM_3); + team4_score = TeamScore_GetCompareValue(NUM_TEAM_4); } ClearWinners(); @@ -2052,25 +2052,25 @@ float WinningCondition_RanOutOfSpawns() FOR_EACH_PLAYER(head) if(head.deadflag == DEAD_NO) { - if(head.team == FL_TEAM_1) + if(head.team == NUM_TEAM_1) team1_score = 1; - else if(head.team == FL_TEAM_2) + else if(head.team == NUM_TEAM_2) team2_score = 1; - else if(head.team == FL_TEAM_3) + else if(head.team == NUM_TEAM_3) team3_score = 1; - else if(head.team == FL_TEAM_4) + else if(head.team == NUM_TEAM_4) team4_score = 1; } for(head = world; (head = find(head, classname, "info_player_deathmatch")) != world; ) { - if(head.team == FL_TEAM_1) + if(head.team == NUM_TEAM_1) team1_score = 1; - else if(head.team == FL_TEAM_2) + else if(head.team == NUM_TEAM_2) team2_score = 1; - else if(head.team == FL_TEAM_3) + else if(head.team == NUM_TEAM_3) team3_score = 1; - else if(head.team == FL_TEAM_4) + else if(head.team == NUM_TEAM_4) team4_score = 1; } @@ -2084,20 +2084,20 @@ float WinningCondition_RanOutOfSpawns() { float t, i; if(team1_score) - t = FL_TEAM_1; + t = NUM_TEAM_1; else if(team2_score) - t = FL_TEAM_2; + t = NUM_TEAM_2; else if(team3_score) - t = FL_TEAM_3; + t = NUM_TEAM_3; else // if(team4_score) - t = FL_TEAM_4; + t = NUM_TEAM_4; CheckAllowedTeams(world); for(i = 0; i < MAX_TEAMSCORE; ++i) { - if(t != FL_TEAM_1) if(c1 >= 0) TeamScore_AddToTeam(FL_TEAM_1, i, -1000); - if(t != FL_TEAM_2) if(c2 >= 0) TeamScore_AddToTeam(FL_TEAM_2, i, -1000); - if(t != FL_TEAM_3) if(c3 >= 0) TeamScore_AddToTeam(FL_TEAM_3, i, -1000); - if(t != FL_TEAM_4) if(c4 >= 0) TeamScore_AddToTeam(FL_TEAM_4, i, -1000); + if(t != NUM_TEAM_1) if(c1 >= 0) TeamScore_AddToTeam(NUM_TEAM_1, i, -1000); + if(t != NUM_TEAM_2) if(c2 >= 0) TeamScore_AddToTeam(NUM_TEAM_2, i, -1000); + if(t != NUM_TEAM_3) if(c3 >= 0) TeamScore_AddToTeam(NUM_TEAM_3, i, -1000); + if(t != NUM_TEAM_4) if(c4 >= 0) TeamScore_AddToTeam(NUM_TEAM_4, i, -1000); } AddWinners(team, t); diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index e82627cec..8f0bc931e 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -618,8 +618,8 @@ void ctf_CheckStalemate(void) switch(tmp_entity.team) { - case FL_TEAM_1: ++stale_red_flags; break; - case FL_TEAM_2: ++stale_blue_flags; break; + case NUM_TEAM_1: ++stale_red_flags; break; + case NUM_TEAM_2: ++stale_blue_flags; break; } } } @@ -942,7 +942,7 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf self.bot_basewaypoint = self.nearestwaypoint; // waypointsprites - WaypointSprite_SpawnFixed(((self.team == FL_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE)); + WaypointSprite_SpawnFixed(((self.team == NUM_TEAM_1) ? "redbase" : "bluebase"), self.origin + FLAG_WAYPOINT_OFFSET, self, wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE)); WaypointSprite_UpdateTeamRadar(self.wps_flagbase, RADARICON_FLAG, colormapPaletteColor(self.team - 1, FALSE)); // captureshield setup @@ -962,7 +962,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag setattachment(flag, world, ""); flag.netname = ((teamnumber) ? "^1REPLACETHIS^7" : "^4REPLACETHIS^7"); // ((teamnumber) ? "^1RED^7 flag" : "^4BLUE^7 flag"); - flag.team = ((teamnumber) ? FL_TEAM_1 : FL_TEAM_2); // FL_TEAM_1: color 4 team (red) - FL_TEAM_2: color 13 team (blue) + flag.team = ((teamnumber) ? NUM_TEAM_1 : NUM_TEAM_2); // NUM_TEAM_1: color 4 team (red) - NUM_TEAM_2: color 13 team (blue) flag.items = ((teamnumber) ? IT_KEY2 : IT_KEY1); // IT_KEY2: gold key (redish enough) - IT_KEY1: silver key (bluish enough) flag.classname = "item_flag_team"; flag.target = "###item###"; // wut? @@ -2040,7 +2040,7 @@ void spawnfunc_info_player_team1() { if(g_assault) { remove(self); return; } - self.team = FL_TEAM_1; // red + self.team = NUM_TEAM_1; // red spawnfunc_info_player_deathmatch(); } @@ -2052,7 +2052,7 @@ void spawnfunc_info_player_team2() { if(g_assault) { remove(self); return; } - self.team = FL_TEAM_2; // blue + self.team = NUM_TEAM_2; // blue spawnfunc_info_player_deathmatch(); } @@ -2063,7 +2063,7 @@ void spawnfunc_info_player_team3() { if(g_assault) { remove(self); return; } - self.team = FL_TEAM_3; // yellow + self.team = NUM_TEAM_3; // yellow spawnfunc_info_player_deathmatch(); } @@ -2075,7 +2075,7 @@ void spawnfunc_info_player_team4() { if(g_assault) { remove(self); return; } - self.team = FL_TEAM_4; // purple + self.team = NUM_TEAM_4; // purple spawnfunc_info_player_deathmatch(); } @@ -2177,8 +2177,8 @@ void ctf_DelayedInit() // Do this check with a delay so we can wait for teams to if(find(world, classname, "ctf_team") == world) { print("No ""ctf_team"" entities found on this map, creating them anyway.\n"); - ctf_SpawnTeam("Red", FL_TEAM_1 - 1); - ctf_SpawnTeam("Blue", FL_TEAM_2 - 1); + ctf_SpawnTeam("Red", NUM_TEAM_1 - 1); + ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1); } ctf_ScoreRules(); diff --git a/qcsrc/server/mutators/gamemode_domination.qc b/qcsrc/server/mutators/gamemode_domination.qc index 1c2ded2db..051eaa333 100644 --- a/qcsrc/server/mutators/gamemode_domination.qc +++ b/qcsrc/server/mutators/gamemode_domination.qc @@ -90,16 +90,16 @@ void dompoint_captured () wait_time = head.wait; switch(head.goalentity.team) { - case FL_TEAM_1: + case NUM_TEAM_1: pps_red += points/wait_time; break; - case FL_TEAM_2: + case NUM_TEAM_2: pps_blue += points/wait_time; break; - case FL_TEAM_3: + case NUM_TEAM_3: pps_yellow += points/wait_time; break; - case FL_TEAM_4: + case NUM_TEAM_4: pps_pink += points/wait_time; } total_pps += points/wait_time; @@ -441,12 +441,12 @@ void dom_spawnteams() { float numteams = ((autocvar_g_domination_teams_override < 2) ? autocvar_g_domination_default_teams : autocvar_g_domination_teams_override); - dom_spawnteam("Red", FL_TEAM_1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point"); - dom_spawnteam("Blue", FL_TEAM_2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point"); + dom_spawnteam("Red", NUM_TEAM_1-1, "models/domination/dom_red.md3", 0, "domination/claim.wav", "", "Red team has captured a control point"); + dom_spawnteam("Blue", NUM_TEAM_2-1, "models/domination/dom_blue.md3", 0, "domination/claim.wav", "", "Blue team has captured a control point"); if(numteams > 2) - dom_spawnteam("Yellow", FL_TEAM_3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point"); + dom_spawnteam("Yellow", NUM_TEAM_3-1, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point"); if(numteams > 3) - dom_spawnteam("Pink", FL_TEAM_4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point"); + dom_spawnteam("Pink", NUM_TEAM_4-1, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point"); dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, "", "", ""); } diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index ad749f12c..c43a39875 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -231,13 +231,13 @@ MUTATOR_HOOKFUNCTION(freezetag_RemovePlayer) { if(self.freezetag_frozen == 0 && self.health >= 1) { - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) --redalive; - else if(self.team == FL_TEAM_2) + else if(self.team == NUM_TEAM_2) --bluealive; - else if(self.team == FL_TEAM_3) + else if(self.team == NUM_TEAM_3) --yellowalive; - else if(self.team == FL_TEAM_4) + else if(self.team == NUM_TEAM_4) --pinkalive; --totalalive; } @@ -254,13 +254,13 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies) { if(self.freezetag_frozen == 0) { - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) --redalive; - else if(self.team == FL_TEAM_2) + else if(self.team == NUM_TEAM_2) --bluealive; - else if(self.team == FL_TEAM_3) + else if(self.team == NUM_TEAM_3) --yellowalive; - else if(self.team == FL_TEAM_4) + else if(self.team == NUM_TEAM_4) --pinkalive; --totalalive; diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/gamemode_keyhunt.qc index e0b3b07a5..97d2dcd47 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/gamemode_keyhunt.qc @@ -39,10 +39,10 @@ float kh_keystatus[17]; float kh_Team_ByID(float t) { - if(t == 0) return FL_TEAM_1; - if(t == 1) return FL_TEAM_2; - if(t == 2) return FL_TEAM_3; - if(t == 3) return FL_TEAM_4; + if(t == 0) return NUM_TEAM_1; + if(t == 1) return NUM_TEAM_2; + if(t == 2) return NUM_TEAM_3; + if(t == 3) return NUM_TEAM_4; return 0; } @@ -330,13 +330,13 @@ void kh_Key_AssignTo(entity key, entity player) // runs every time a key is pic WaypointSprite_AttachCarrier("", player, RADARICON_FLAGCARRIER, colormapPaletteColor(player.team - 1, 0)); player.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_KeyCarrier_waypointsprite_visible_for_player; WaypointSprite_UpdateRule(player.waypointsprite_attachedforcarrier, player.team, SPRITERULE_TEAMPLAY); - if(player.team == FL_TEAM_1) + if(player.team == NUM_TEAM_1) WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-red", "keycarrier-friend", "keycarrier-red"); - else if(player.team == FL_TEAM_2) + else if(player.team == NUM_TEAM_2) WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-blue", "keycarrier-friend", "keycarrier-blue"); - else if(player.team == FL_TEAM_3) + else if(player.team == NUM_TEAM_3) WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-yellow", "keycarrier-friend", "keycarrier-yellow"); - else if(player.team == FL_TEAM_4) + else if(player.team == NUM_TEAM_4) WaypointSprite_UpdateSprites(player.waypointsprite_attachedforcarrier, "keycarrier-pink", "keycarrier-friend", "keycarrier-pink"); if(!kh_no_radar_circles) WaypointSprite_Ping(player.waypointsprite_attachedforcarrier); @@ -725,16 +725,16 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i) // runs every tim switch(initial_owner.team) { - case FL_TEAM_1: + case NUM_TEAM_1: key.netname = "^1red key"; break; - case FL_TEAM_2: + case NUM_TEAM_2: key.netname = "^4blue key"; break; - case FL_TEAM_3: + case NUM_TEAM_3: key.netname = "^3yellow key"; break; - case FL_TEAM_4: + case NUM_TEAM_4: key.netname = "^6pink key"; break; default: diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 74698d371..ed2e7b16a 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -425,28 +425,28 @@ void nb_spawnteams(void) { switch(e.team) { - case FL_TEAM_1: + case NUM_TEAM_1: if(!t_r) { nb_spawnteam("Red", e.team-1) ; t_r = 1; } break; - case FL_TEAM_2: + case NUM_TEAM_2: if(!t_b) { nb_spawnteam("Blue", e.team-1) ; t_b = 1; } break; - case FL_TEAM_3: + case NUM_TEAM_3: if(!t_y) { nb_spawnteam("Yellow", e.team-1); t_y = 1; } break; - case FL_TEAM_4: + case NUM_TEAM_4: if(!t_p) { nb_spawnteam("Pink", e.team-1) ; @@ -576,22 +576,22 @@ void SpawnGoal(void) void spawnfunc_nexball_redgoal(void) { - self.team = FL_TEAM_1; + self.team = NUM_TEAM_1; SpawnGoal(); } void spawnfunc_nexball_bluegoal(void) { - self.team = FL_TEAM_2; + self.team = NUM_TEAM_2; SpawnGoal(); } void spawnfunc_nexball_yellowgoal(void) { - self.team = FL_TEAM_3; + self.team = NUM_TEAM_3; SpawnGoal(); } void spawnfunc_nexball_pinkgoal(void) { - self.team = FL_TEAM_4; + self.team = NUM_TEAM_4; SpawnGoal(); } diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index ee07c8f40..1e160bec7 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -163,16 +163,16 @@ void onslaught_updatelinks() } if(l.goalentity.classname == "onslaught_generator") { - if(l.goalentity.team == FL_TEAM_1) + if(l.goalentity.team == NUM_TEAM_1) l.enemy.isgenneighbor_red = TRUE; - else if(l.goalentity.team == FL_TEAM_2) + else if(l.goalentity.team == NUM_TEAM_2) l.enemy.isgenneighbor_blue = TRUE; } else { - if(l.goalentity.team == FL_TEAM_1) + if(l.goalentity.team == NUM_TEAM_1) l.enemy.iscpneighbor_red = TRUE; - else if(l.goalentity.team == FL_TEAM_2) + else if(l.goalentity.team == NUM_TEAM_2) l.enemy.iscpneighbor_blue = TRUE; } } @@ -185,16 +185,16 @@ void onslaught_updatelinks() } if(l.enemy.classname == "onslaught_generator") { - if(l.enemy.team == FL_TEAM_1) + if(l.enemy.team == NUM_TEAM_1) l.goalentity.isgenneighbor_red = TRUE; - else if(l.enemy.team == FL_TEAM_2) + else if(l.enemy.team == NUM_TEAM_2) l.goalentity.isgenneighbor_blue = TRUE; } else { - if(l.enemy.team == FL_TEAM_1) + if(l.enemy.team == NUM_TEAM_1) l.goalentity.iscpneighbor_red = TRUE; - else if(l.enemy.team == FL_TEAM_2) + else if(l.enemy.team == NUM_TEAM_2) l.goalentity.iscpneighbor_blue = TRUE; } } @@ -254,10 +254,10 @@ void onslaught_updatelinks() { if (l.iscaptured) { - if (l.team == FL_TEAM_1) t1 = 1; - if (l.team == FL_TEAM_2) t2 = 1; - if (l.team == FL_TEAM_3) t3 = 1; - if (l.team == FL_TEAM_4) t4 = 1; + if (l.team == NUM_TEAM_1) t1 = 1; + if (l.team == NUM_TEAM_2) t2 = 1; + if (l.team == NUM_TEAM_3) t3 = 1; + if (l.team == NUM_TEAM_4) t4 = 1; } onslaught_generator_updatesprite(l); l = l.chain; @@ -271,14 +271,14 @@ void onslaught_updatelinks() float onslaught_controlpoint_can_be_linked(entity cp, float t) { - if(t == FL_TEAM_1) + if(t == NUM_TEAM_1) { if(cp.isgenneighbor_red) return 2; if(cp.iscpneighbor_red) return 1; } - else if(t == FL_TEAM_2) + else if(t == NUM_TEAM_2) { if(cp.isgenneighbor_blue) return 2; @@ -354,7 +354,7 @@ float onslaught_controlpoint_attackable(entity cp, float t) // if there's already an icon built, nothing happens if(cp.team == t) { - a = onslaught_controlpoint_can_be_linked(cp, FL_TEAM_1 + FL_TEAM_2 - t); + a = onslaught_controlpoint_can_be_linked(cp, NUM_TEAM_1 + NUM_TEAM_2 - t); if(a) // attackable by enemy? return -2; // EMERGENCY! return -1; @@ -371,7 +371,7 @@ float onslaught_controlpoint_attackable(entity cp, float t) // free point if(onslaught_controlpoint_can_be_linked(cp, t)) { - a = onslaught_controlpoint_can_be_linked(cp, FL_TEAM_1 + FL_TEAM_2 - t); + a = onslaught_controlpoint_can_be_linked(cp, NUM_TEAM_1 + NUM_TEAM_2 - t); if(a == 2) return 4; // GET THIS ONE NOW! else @@ -706,16 +706,16 @@ string onslaught_generator_waypointsprite_for_team(entity e, float t) { if(t == e.team) { - if(e.team == FL_TEAM_1) + if(e.team == NUM_TEAM_1) return "ons-gen-red"; - else if(e.team == FL_TEAM_2) + else if(e.team == NUM_TEAM_2) return "ons-gen-blue"; } if(e.isshielded) return "ons-gen-shielded"; - if(e.team == FL_TEAM_1) + if(e.team == NUM_TEAM_1) return "ons-gen-red"; - else if(e.team == FL_TEAM_2) + else if(e.team == NUM_TEAM_2) return "ons-gen-blue"; return ""; } @@ -723,8 +723,8 @@ string onslaught_generator_waypointsprite_for_team(entity e, float t) void onslaught_generator_updatesprite(entity e) { string s1, s2, s3; - s1 = onslaught_generator_waypointsprite_for_team(e, FL_TEAM_1); - s2 = onslaught_generator_waypointsprite_for_team(e, FL_TEAM_2); + s1 = onslaught_generator_waypointsprite_for_team(e, NUM_TEAM_1); + s2 = onslaught_generator_waypointsprite_for_team(e, NUM_TEAM_2); s3 = onslaught_generator_waypointsprite_for_team(e, -1); WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3); @@ -734,14 +734,14 @@ void onslaught_generator_updatesprite(entity e) e.lastshielded = e.isshielded; if(e.lastshielded) { - if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2) + if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, 0.5 * colormapPaletteColor(e.team - 1, FALSE)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.5 0.5 0.5'); } else { - if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2) + if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, colormapPaletteColor(e.team - 1, FALSE)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_GENERATOR, '0.75 0.75 0.75'); @@ -758,25 +758,25 @@ string onslaught_controlpoint_waypointsprite_for_team(entity e, float t) a = onslaught_controlpoint_attackable(e, t); if(a == 3 || a == 4) // ATTACK/TOUCH THIS ONE NOW { - if(e.team == FL_TEAM_1) + if(e.team == NUM_TEAM_1) return "ons-cp-atck-red"; - else if(e.team == FL_TEAM_2) + else if(e.team == NUM_TEAM_2) return "ons-cp-atck-blue"; else return "ons-cp-atck-neut"; } else if(a == -2) // DEFEND THIS ONE NOW { - if(e.team == FL_TEAM_1) + if(e.team == NUM_TEAM_1) return "ons-cp-dfnd-red"; - else if(e.team == FL_TEAM_2) + else if(e.team == NUM_TEAM_2) return "ons-cp-dfnd-blue"; } else if(e.team == t || a == -1 || a == 1) // own point, or fire at it { - if(e.team == FL_TEAM_1) + if(e.team == NUM_TEAM_1) return "ons-cp-red"; - else if(e.team == FL_TEAM_2) + else if(e.team == NUM_TEAM_2) return "ons-cp-blue"; } else if(a == 2) // touch it @@ -784,9 +784,9 @@ string onslaught_controlpoint_waypointsprite_for_team(entity e, float t) } else { - if(e.team == FL_TEAM_1) + if(e.team == NUM_TEAM_1) return "ons-cp-red"; - else if(e.team == FL_TEAM_2) + else if(e.team == NUM_TEAM_2) return "ons-cp-blue"; else return "ons-cp-neut"; @@ -797,13 +797,13 @@ string onslaught_controlpoint_waypointsprite_for_team(entity e, float t) void onslaught_controlpoint_updatesprite(entity e) { string s1, s2, s3; - s1 = onslaught_controlpoint_waypointsprite_for_team(e, FL_TEAM_1); - s2 = onslaught_controlpoint_waypointsprite_for_team(e, FL_TEAM_2); + s1 = onslaught_controlpoint_waypointsprite_for_team(e, NUM_TEAM_1); + s2 = onslaught_controlpoint_waypointsprite_for_team(e, NUM_TEAM_2); s3 = onslaught_controlpoint_waypointsprite_for_team(e, -1); WaypointSprite_UpdateSprites(e.sprite, s1, s2, s3); float sh; - sh = !(onslaught_controlpoint_can_be_linked(e, FL_TEAM_1) || onslaught_controlpoint_can_be_linked(e, FL_TEAM_2)); + sh = !(onslaught_controlpoint_can_be_linked(e, NUM_TEAM_1) || onslaught_controlpoint_can_be_linked(e, NUM_TEAM_2)); if(e.lastteam != e.team + 2 || e.lastshielded != sh || e.iscaptured != e.lastcaptured) { @@ -821,14 +821,14 @@ void onslaught_controlpoint_updatesprite(entity e) } if(e.lastshielded) { - if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2) + if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, 0.5 * colormapPaletteColor(e.team - 1, FALSE)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.5 0.5 0.5'); } else { - if(e.team == FL_TEAM_1 || e.team == FL_TEAM_2) + if(e.team == NUM_TEAM_1 || e.team == NUM_TEAM_2) WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, colormapPaletteColor(e.team - 1, FALSE)); else WaypointSprite_UpdateTeamRadar(e.sprite, RADARICON_CONTROLPOINT, '0.75 0.75 0.75'); @@ -910,10 +910,10 @@ void spawnfunc_onslaught_generator() if (!self.team) objerror("team must be set"); - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) ons_red_generator = self; - if(self.team == FL_TEAM_2) + if(self.team == NUM_TEAM_2) ons_blue_generator = self; self.team_saved = self.team; @@ -948,7 +948,7 @@ void spawnfunc_onslaught_generator() InitializeEntity(self, onslaught_generator_delayed, INITPRIO_LAST); WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0'); - WaypointSprite_UpdateRule(self.sprite, FL_TEAM_2, SPRITERULE_TEAMPLAY); + WaypointSprite_UpdateRule(self.sprite, NUM_TEAM_2, SPRITERULE_TEAMPLAY); WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health); WaypointSprite_UpdateHealth(self.sprite, self.health); @@ -988,7 +988,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float if (attacker.classname == "player") { nag = FALSE; - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) { if(time - ons_notification_time_team1 > 10) { @@ -996,7 +996,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float ons_notification_time_team1 = time; } } - else if(self.team == FL_TEAM_2) + else if(self.team == NUM_TEAM_2) { if(time - ons_notification_time_team2 > 10) { @@ -1438,7 +1438,7 @@ void spawnfunc_onslaught_controlpoint() waypoint_spawnforitem(self); WaypointSprite_SpawnFixed(string_null, self.origin + '0 0 128', self, sprite, RADARICON_NONE, '0 0 0'); - WaypointSprite_UpdateRule(self.sprite, FL_TEAM_2, SPRITERULE_TEAMPLAY); + WaypointSprite_UpdateRule(self.sprite, NUM_TEAM_2, SPRITERULE_TEAMPLAY); onslaught_updatelinks(); @@ -1476,28 +1476,28 @@ void onslaught_link_checkupdate() redpower = bluepower = 0; if(self.goalentity.islinked) { - if(self.goalentity.team == FL_TEAM_1) + if(self.goalentity.team == NUM_TEAM_1) redpower = 1; - else if(self.goalentity.team == FL_TEAM_2) + else if(self.goalentity.team == NUM_TEAM_2) bluepower = 1; } if(self.enemy.islinked) { - if(self.enemy.team == FL_TEAM_1) + if(self.enemy.team == NUM_TEAM_1) redpower = 2; - else if(self.enemy.team == FL_TEAM_2) + else if(self.enemy.team == NUM_TEAM_2) bluepower = 2; } float cc; if(redpower == 1 && bluepower == 2) - cc = (FL_TEAM_1 - 1) * 0x01 + (FL_TEAM_2 - 1) * 0x10; + cc = (NUM_TEAM_1 - 1) * 0x01 + (NUM_TEAM_2 - 1) * 0x10; else if(redpower == 2 && bluepower == 1) - cc = (FL_TEAM_1 - 1) * 0x10 + (FL_TEAM_2 - 1) * 0x01; + cc = (NUM_TEAM_1 - 1) * 0x10 + (NUM_TEAM_2 - 1) * 0x01; else if(redpower) - cc = (FL_TEAM_1 - 1) * 0x11; + cc = (NUM_TEAM_1 - 1) * 0x11; else if(bluepower) - cc = (FL_TEAM_2 - 1) * 0x11; + cc = (NUM_TEAM_2 - 1) * 0x11; else cc = 0; @@ -1569,10 +1569,10 @@ MUTATOR_HOOKFUNCTION(ons_Spawn_Score) RandomSelection_Init(); - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1); - if(self.team == FL_TEAM_2) + if(self.team == NUM_TEAM_2) RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1); entity _cp = findchain(classname, "onslaught_controlpoint"): @@ -1611,7 +1611,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn) RandomSelection_Init(); - if(self.team == FL_TEAM_1) + if(self.team == NUM_TEAM_1) { if(!_close_to_home) _trg_gen = ons_blue_generator; @@ -1619,7 +1619,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn) _trg_gen = ons_red_generator; } - if(self.team == FL_TEAM_2) + if(self.team == NUM_TEAM_2) { if(_close_to_home) _trg_gen = ons_blue_generator; @@ -1664,7 +1664,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn) if(!autocvar_g_onslaught_spawn_at_generator) return 0; - _trg_gen = ((self.team == FL_TEAM_1) ? ons_red_generator : ons_blue_generator); + _trg_gen = ((self.team == NUM_TEAM_1) ? ons_red_generator : ons_blue_generator); for(i = 0; i < 10; ++i) { diff --git a/qcsrc/server/mutators/mutator_superspec.qc b/qcsrc/server/mutators/mutator_superspec.qc index a5fb0e801..a351f937c 100644 --- a/qcsrc/server/mutators/mutator_superspec.qc +++ b/qcsrc/server/mutators/mutator_superspec.qc @@ -392,9 +392,9 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand) if(cmd_argc == 2) { if(argv(1) == "red") - _team = FL_TEAM_1; + _team = NUM_TEAM_1; else - _team = FL_TEAM_2; + _team = NUM_TEAM_2; } FOR_EACH_PLAYER(_player) diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 1d62a7084..eb305e722 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -204,13 +204,13 @@ void ScoreInfo_Init(float teams) Net_LinkEntity(scores_initialized, FALSE, 0, ScoreInfo_SendEntity); } if(teams >= 1) - TeamScore_Spawn(FL_TEAM_1, "Red"); + TeamScore_Spawn(NUM_TEAM_1, "Red"); if(teams >= 2) - TeamScore_Spawn(FL_TEAM_2, "Blue"); + TeamScore_Spawn(NUM_TEAM_2, "Blue"); if(teams >= 3) - TeamScore_Spawn(FL_TEAM_3, "Yellow"); + TeamScore_Spawn(NUM_TEAM_3, "Yellow"); if(teams >= 4) - TeamScore_Spawn(FL_TEAM_4, "Pink"); + TeamScore_Spawn(NUM_TEAM_4, "Pink"); } /* diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index dddd5f1d4..a96726c56 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -377,13 +377,13 @@ void SetPlayerTeam(entity pl, float t, float s, float noprint) float _color; if(t == 4) - _color = FL_TEAM_4 - 1; + _color = NUM_TEAM_4 - 1; else if(t == 3) - _color = FL_TEAM_3 - 1; + _color = NUM_TEAM_3 - 1; else if(t == 2) - _color = FL_TEAM_2 - 1; + _color = NUM_TEAM_2 - 1; else - _color = FL_TEAM_1 - 1; + _color = NUM_TEAM_1 - 1; SetPlayerColors(pl,_color); @@ -413,10 +413,10 @@ void CheckAllowedTeams (entity for_whom) head = findchain(classname, "onslaught_generator"); while (head) { - if (head.team == FL_TEAM_1) c1 = 0; - if (head.team == FL_TEAM_2) c2 = 0; - if (head.team == FL_TEAM_3) c3 = 0; - if (head.team == FL_TEAM_4) c4 = 0; + if (head.team == NUM_TEAM_1) c1 = 0; + if (head.team == NUM_TEAM_2) c2 = 0; + if (head.team == NUM_TEAM_3) c3 = 0; + if (head.team == NUM_TEAM_4) c4 = 0; head = head.chain; } } @@ -458,13 +458,13 @@ void CheckAllowedTeams (entity for_whom) { if(!(g_domination && head.netname == "")) { - if(head.team == FL_TEAM_1) + if(head.team == NUM_TEAM_1) c1 = 0; - else if(head.team == FL_TEAM_2) + else if(head.team == NUM_TEAM_2) c2 = 0; - else if(head.team == FL_TEAM_3) + else if(head.team == NUM_TEAM_3) c3 = 0; - else if(head.team == FL_TEAM_4) + else if(head.team == NUM_TEAM_4) c4 = 0; } head = find(head, classname, teament_name); @@ -494,13 +494,13 @@ void CheckAllowedTeams (entity for_whom) } // if player has a forced team, ONLY allow that one - if(self.team_forced == FL_TEAM_1 && c1 >= 0) + if(self.team_forced == NUM_TEAM_1 && c1 >= 0) c2 = c3 = c4 = -1; - else if(self.team_forced == FL_TEAM_2 && c2 >= 0) + else if(self.team_forced == NUM_TEAM_2 && c2 >= 0) c1 = c3 = c4 = -1; - else if(self.team_forced == FL_TEAM_3 && c3 >= 0) + else if(self.team_forced == NUM_TEAM_3 && c3 >= 0) c1 = c2 = c4 = -1; - else if(self.team_forced == FL_TEAM_4 && c4 >= 0) + else if(self.team_forced == NUM_TEAM_4 && c4 >= 0) c1 = c2 = c3 = -1; } @@ -537,7 +537,7 @@ void GetTeamCounts(entity ignore) bvalue = value; else bvalue = 0; - if(t == FL_TEAM_1) + if(t == NUM_TEAM_1) { if(c1 >= 0) { @@ -545,7 +545,7 @@ void GetTeamCounts(entity ignore) cb1 = cb1 + bvalue; } } - if(t == FL_TEAM_2) + if(t == NUM_TEAM_2) { if(c2 >= 0) { @@ -553,7 +553,7 @@ void GetTeamCounts(entity ignore) cb2 = cb2 + bvalue; } } - if(t == FL_TEAM_3) + if(t == NUM_TEAM_3) { if(c3 >= 0) { @@ -561,7 +561,7 @@ void GetTeamCounts(entity ignore) cb3 = cb3 + bvalue; } } - if(t == FL_TEAM_4) + if(t == NUM_TEAM_4) { if(c4 >= 0) { @@ -730,13 +730,13 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam) // if he's not on a valid team, then let other code put him on the smallest team if(!forcebestteam) { - if( c1 >= 0 && pl.team == FL_TEAM_1) + if( c1 >= 0 && pl.team == NUM_TEAM_1) selectedteam = pl.team; - else if(c2 >= 0 && pl.team == FL_TEAM_2) + else if(c2 >= 0 && pl.team == NUM_TEAM_2) selectedteam = pl.team; - else if(c3 >= 0 && pl.team == FL_TEAM_3) + else if(c3 >= 0 && pl.team == NUM_TEAM_3) selectedteam = pl.team; - else if(c4 >= 0 && pl.team == FL_TEAM_4) + else if(c4 >= 0 && pl.team == NUM_TEAM_4) selectedteam = pl.team; else selectedteam = -1; @@ -763,19 +763,19 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam) TeamchangeFrags(self); if(smallest == 1) { - SetPlayerColors(pl, FL_TEAM_1 - 1); + SetPlayerColors(pl, NUM_TEAM_1 - 1); } else if(smallest == 2) { - SetPlayerColors(pl, FL_TEAM_2 - 1); + SetPlayerColors(pl, NUM_TEAM_2 - 1); } else if(smallest == 3) { - SetPlayerColors(pl, FL_TEAM_3 - 1); + SetPlayerColors(pl, NUM_TEAM_3 - 1); } else if(smallest == 4) { - SetPlayerColors(pl, FL_TEAM_4 - 1); + SetPlayerColors(pl, NUM_TEAM_4 - 1); } else { @@ -805,21 +805,21 @@ void SV_ChangeTeam(float _color) scolor = self.clientcolors & 0x0F; dcolor = _color & 0x0F; - if(scolor == FL_TEAM_1 - 1) + if(scolor == NUM_TEAM_1 - 1) steam = 1; - else if(scolor == FL_TEAM_2 - 1) + else if(scolor == NUM_TEAM_2 - 1) steam = 2; - else if(scolor == FL_TEAM_3 - 1) + else if(scolor == NUM_TEAM_3 - 1) steam = 3; - else // if(scolor == FL_TEAM_4 - 1) + else // if(scolor == NUM_TEAM_4 - 1) steam = 4; - if(dcolor == FL_TEAM_1 - 1) + if(dcolor == NUM_TEAM_1 - 1) dteam = 1; - else if(dcolor == FL_TEAM_2 - 1) + else if(dcolor == NUM_TEAM_2 - 1) dteam = 2; - else if(dcolor == FL_TEAM_3 - 1) + else if(dcolor == NUM_TEAM_3 - 1) dteam = 3; - else // if(dcolor == FL_TEAM_4 - 1) + else // if(dcolor == NUM_TEAM_4 - 1) dteam = 4; CheckAllowedTeams(self); @@ -908,13 +908,13 @@ void ShufflePlayerOutOfTeam (float source_team) } if(source_team == 1) - steam = FL_TEAM_1; + steam = NUM_TEAM_1; else if(source_team == 2) - steam = FL_TEAM_2; + steam = NUM_TEAM_2; else if(source_team == 3) - steam = FL_TEAM_3; + steam = NUM_TEAM_3; else // if(source_team == 4) - steam = FL_TEAM_4; + steam = NUM_TEAM_4; lowest_bot = world; lowest_bot_score = 999999999; @@ -1033,12 +1033,12 @@ void tdm_spawnteams() numteams = autocvar_g_tdm_teams; numteams = bound(2, numteams, 4); - tdm_spawnteam("Red", FL_TEAM_1-1); - tdm_spawnteam("Blue", FL_TEAM_2-1); + tdm_spawnteam("Red", NUM_TEAM_1-1); + tdm_spawnteam("Blue", NUM_TEAM_2-1); if(numteams >= 3) - tdm_spawnteam("Yellow", FL_TEAM_3-1); + tdm_spawnteam("Yellow", NUM_TEAM_3-1); if(numteams >= 4) - tdm_spawnteam("Pink", FL_TEAM_4-1); + tdm_spawnteam("Pink", NUM_TEAM_4-1); } void tdm_delayedinit() diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 1eaa5c4e5..1f8656fb8 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -43,25 +43,25 @@ void W_MinstaNex_Attack (void) { switch(self.team) { - case FL_TEAM_1: // Red + case NUM_TEAM_1: // Red if(damage_goodhits) WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v); else WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v); break; - case FL_TEAM_2: // Blue + case NUM_TEAM_2: // Blue if(damage_goodhits) WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v); else WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v); break; - case FL_TEAM_3: // Yellow + case NUM_TEAM_3: // Yellow if(damage_goodhits) WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v); else WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v); break; - case FL_TEAM_4: // Pink + case NUM_TEAM_4: // Pink if(damage_goodhits) WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v); else diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 897ab5539..9e0d24c04 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -186,7 +186,7 @@ float Tuba_GetNote(entity pl, float hittype) // that way, holes in the range of notes are "plugged" if(teamplay) { - if(pl.team == FL_TEAM_2 || pl.team == FL_TEAM_4) + if(pl.team == NUM_TEAM_2 || pl.team == NUM_TEAM_4) note += 3; } else