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)
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';
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;
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;
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;
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;
}
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 {
}
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 {
{
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:
{
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;
*/
#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"), "") \
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!"), "") \
#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
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;
{
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";
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
}
{
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;
}
{
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;
{
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;
#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))
// 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;
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;
{
// 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;
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");
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();
}
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();
}
}
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();
}
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;
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;
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;
}
{
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;
}
}
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)
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)
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);
}
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)
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);
}
// 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"));
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();}
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();}
remove(self);
return;
}
- self.team = FL_TEAM_3; // yellow
+ self.team = NUM_TEAM_3; // yellow
spawnfunc_info_player_deathmatch();
}
remove(self);
return;
}
- self.team = FL_TEAM_4; // purple
+ self.team = NUM_TEAM_4; // purple
spawnfunc_info_player_deathmatch();
}
// 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;
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###";
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###";
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()
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) {
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", "", "");
}
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;
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, "", "", "");
}
{
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;
}
}
}
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();
}
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);
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;
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;
{
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")
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;
// 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;
}
{
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");
}
{
// 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;
}
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;
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();
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;
}
{
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);
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;
}
}
}
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
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?
{
if(g_assault) { remove(self); return; }
- self.team = FL_TEAM_1; // red
+ self.team = NUM_TEAM_1; // red
spawnfunc_info_player_deathmatch();
}
{
if(g_assault) { remove(self); return; }
- self.team = FL_TEAM_2; // blue
+ self.team = NUM_TEAM_2; // blue
spawnfunc_info_player_deathmatch();
}
{
if(g_assault) { remove(self); return; }
- self.team = FL_TEAM_3; // yellow
+ self.team = NUM_TEAM_3; // yellow
spawnfunc_info_player_deathmatch();
}
{
if(g_assault) { remove(self); return; }
- self.team = FL_TEAM_4; // purple
+ self.team = NUM_TEAM_4; // purple
spawnfunc_info_player_deathmatch();
}
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();
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;
{
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, "", "", "");
}
{
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;
}
{
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;
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;
}
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);
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:
{
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) ;
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();
}
}
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;
}
}
}
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;
}
}
{
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;
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;
// 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;
// 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
{
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 "";
}
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);
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');
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
}
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";
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)
{
}
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');
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;
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);
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)
{
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)
{
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();
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;
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"):
RandomSelection_Init();
- if(self.team == FL_TEAM_1)
+ if(self.team == NUM_TEAM_1)
{
if(!_close_to_home)
_trg_gen = ons_blue_generator;
_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;
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)
{
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)
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");
}
/*
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);
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;
}
}
{
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);
}
// 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;
}
bvalue = value;
else
bvalue = 0;
- if(t == FL_TEAM_1)
+ if(t == NUM_TEAM_1)
{
if(c1 >= 0)
{
cb1 = cb1 + bvalue;
}
}
- if(t == FL_TEAM_2)
+ if(t == NUM_TEAM_2)
{
if(c2 >= 0)
{
cb2 = cb2 + bvalue;
}
}
- if(t == FL_TEAM_3)
+ if(t == NUM_TEAM_3)
{
if(c3 >= 0)
{
cb3 = cb3 + bvalue;
}
}
- if(t == FL_TEAM_4)
+ if(t == NUM_TEAM_4)
{
if(c4 >= 0)
{
// 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;
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
{
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);
}
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;
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()
{
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
// 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