modifications = strcat(modifications, ", Low gravity");
if(g_cloaked)
modifications = strcat(modifications, ", Cloaked");
- if(g_footsteps)
- modifications = strcat(modifications, ", Steps");
if(g_grappling_hook)
modifications = strcat(modifications, ", Hook");
if(g_laserguided_missile)
if(IsTeamBalanceForced() == 1)
return 1;
return 1;
+ // FIXME: it always returns 1...
}
// c1...c4 should be set to -1 (not allowed) or 0 (allowed).
// find out what teams are available
CheckAllowedTeams(pl);
+ // if we want the player in a certain team for campaign, force him there
+ if(cvar("g_campaign"))
+ if(clienttype(pl) == CLIENTTYPE_REAL) // only players, not bots
+ {
+ switch(cvar("g_campaign_forceteam"))
+ {
+ case 1:
+ SetPlayerColors(pl, COLOR_TEAM1 - 1);
+ LogTeamchange(pl.playerid, pl.team, 2);
+ return COLOR_TEAM1;
+ case 2:
+ SetPlayerColors(pl, COLOR_TEAM2 - 1);
+ LogTeamchange(pl.playerid, pl.team, 2);
+ return COLOR_TEAM2;
+ case 3:
+ SetPlayerColors(pl, COLOR_TEAM3 - 1);
+ LogTeamchange(pl.playerid, pl.team, 2);
+ return COLOR_TEAM3;
+ case 4:
+ SetPlayerColors(pl, COLOR_TEAM4 - 1);
+ LogTeamchange(pl.playerid, pl.team, 2);
+ return COLOR_TEAM4;
+ default:
+ break;
+ }
+ }
+
// if we don't care what team he ends up on, put him on whatever team he entered as.
// if he's not on a valid team, then let other code put him on the smallest team
if(!forcebestteam)
smallest = FindSmallestTeam(pl, TRUE);
- if(!only_return_best)
+ if(!only_return_best && !pl.bot_forced_team)
{
TeamchangeFrags(self);
if(smallest == 1)