prev_missing_teams_mask = -1;
return false;
}
- int missing_teams_mask = (!redalive) + (!bluealive) * 2;
- if(NumTeams(ca_teams) >= 3) missing_teams_mask += (!yellowalive) * 4;
- if(NumTeams(ca_teams) >= 4) missing_teams_mask += (!pinkalive) * 8;
+ int missing_teams_mask = 0;
+ if(ca_teams & BIT(0))
+ missing_teams_mask += (!redalive) * 1;
+ if(ca_teams & BIT(1))
+ missing_teams_mask += (!bluealive) * 2;
+ if(ca_teams & BIT(2))
+ missing_teams_mask += (!yellowalive) * 4;
+ if(ca_teams & BIT(3))
+ missing_teams_mask += (!pinkalive) * 8;
if(prev_missing_teams_mask != missing_teams_mask)
{
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);
{
switch(argv(1))
{
- case "red": _team = NUM_TEAM_1; break;
- case "blue": _team = NUM_TEAM_2; break;
- case "yellow": if(NumTeams(ctf_teams) >= 3) _team = NUM_TEAM_3; break;
- case "pink": if(NumTeams(ctf_teams) >= 4) _team = NUM_TEAM_4; break;
+ case "red": if(ctf_teams & BIT(0)) _team = NUM_TEAM_1; break;
+ case "blue": if(ctf_teams & BIT(1)) _team = NUM_TEAM_2; break;
+ case "yellow": if(ctf_teams & BIT(2)) _team = NUM_TEAM_3; break;
+ case "pink": if(ctf_teams & BIT(3)) _team = NUM_TEAM_4; break;
}
}
prev_missing_teams_mask = -1;
return 0;
}
- float missing_teams_mask = (!redalive) + (!bluealive) * 2;
- if(NumTeams(freezetag_teams) >= 3) missing_teams_mask += (!yellowalive) * 4;
- if(NumTeams(freezetag_teams) >= 4) missing_teams_mask += (!pinkalive) * 8;
+ int missing_teams_mask = 0;
+ if(freezetag_teams & BIT(0))
+ missing_teams_mask += (!redalive) * 1;
+ if(freezetag_teams & BIT(1))
+ missing_teams_mask += (!bluealive) * 2;
+ if(freezetag_teams & BIT(2))
+ missing_teams_mask += (!yellowalive) * 4;
+ if(freezetag_teams & BIT(3))
+ missing_teams_mask += (!pinkalive) * 8;
if(prev_missing_teams_mask != missing_teams_mask)
{
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);
}
else
{
- float missing_teams_mask = boolean(p1) + boolean(p2) * 2;
- if(kh_teams >= 3) missing_teams_mask += boolean(p3) * 4;
- if(kh_teams >= 4) missing_teams_mask += boolean(p4) * 8;
+ int missing_teams_mask = 0;
+ if(kh_teams & BIT(0))
+ missing_teams_mask += boolean(p1) * 1;
+ if(kh_teams & BIT(1))
+ missing_teams_mask += boolean(p2) * 2;
+ if(kh_teams & BIT(2))
+ missing_teams_mask += boolean(p3) * 4;
+ if(kh_teams & BIT(3))
+ missing_teams_mask += boolean(p4) * 8;
if(prev_missing_teams_mask != missing_teams_mask)
{
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);