Added ChangeTeam function for teamplay

Also removes the TeamLibrary global since all it did was call what should've been static functions.
This commit is contained in:
Boondorl 2024-05-23 12:16:34 -04:00 committed by Ricardo Luís Vaz Silva
commit 53270f0bc8
7 changed files with 49 additions and 22 deletions

View file

@ -305,7 +305,7 @@ bool FCajunMaster::SpawnBot (const char *name, int color)
{
concat << colors[bot_next_color];
}
if (TeamLibrary.IsValidTeam (thebot->lastteam))
if (FTeam::IsValid (thebot->lastteam))
{ // Keep the bot on the same team when switching levels
concat.AppendFormat("\\team\\%d\n", thebot->lastteam);
}
@ -587,7 +587,7 @@ bool FCajunMaster::LoadBots ()
if (IsNum (sc.String))
{
teamnum = atoi (sc.String);
if (!TeamLibrary.IsValidTeam (teamnum))
if (!FTeam::IsValid (teamnum))
{
teamnum = TEAM_NONE;
}