else bot_pants = ftos(floor(random() * 15));
if (teamplay && !(autocvar_bot_vs_human && AvailableTeams() == 2))
+ {
this.bot_forced_team = stof(argv(5));
+ if (!Team_IsValidIndex(this.bot_forced_team))
+ this.bot_forced_team = 0;
+ }
else
this.bot_forced_team = 0;
PlayerState_attach(this);
accuracy_resend(this);
- if (IS_BOT_CLIENT(this))
- {
- if (teamplay && Team_IsValidIndex(this.bot_forced_team))
- SetPlayerTeam(this, this.bot_forced_team, TEAM_CHANGE_MANUAL);
- else
- this.bot_forced_team = 0;
- }
+ if (teamplay && this.bot_forced_team)
+ SetPlayerTeam(this, this.bot_forced_team, TEAM_CHANGE_MANUAL);
if (this.team < 0)
TeamBalance_JoinBestTeam(this);