-string cache_mutatormsg;
-string cache_lastmutatormsg;
-
-// client counts for each team
-float c1, c2, c3, c4;
-// # of bots on those teams
-float cb1, cb2, cb3, cb4;
-
-//float audit_teams_time;
+#include "teamplay.qh"
void TeamchangeFrags(entity e)
{
PlayerScore_Clear(e);
}
-void entcs_init();
-
void LogTeamchange(float player_id, float team_number, float type)
{
if(!autocvar_sv_eventlog)
// invalid
if(ca < 0 || cb < 0)
- return FALSE;
+ return false;
// equal
if(ta == tb)
- return TRUE;
+ return true;
if(IS_REAL_CLIENT(e))
{
// keep teams alive (teams of size 0 always count as smaller, ignoring score)
if(ca < 1)
if(cb >= 1)
- return TRUE;
+ return true;
if(ca >= 1)
if(cb < 1)
- return FALSE;
+ return false;
// first, normalize
f = max(ca, cb, 1);
// otherwise end up on the smallest team (handled below)
}
- smallest = FindSmallestTeam(pl, TRUE);
+ smallest = FindSmallestTeam(pl, true);
if(!only_return_best && !pl.bot_forced_team)
{
if(scolor == dcolor)
{
//bprint("same team change\n");
- SetPlayerTeam(self, dteam, steam, TRUE);
+ SetPlayerTeam(self, dteam, steam, true);
return;
}
TeamchangeFrags(self);
}
- SetPlayerTeam(self, dteam, steam, FALSE);
+ SetPlayerTeam(self, dteam, steam, false);
if(IS_PLAYER(self) && steam != dteam)
{
// move the player to the new team
TeamchangeFrags(selected);
- SetPlayerTeam(selected, smallestteam, source_team, FALSE);
+ SetPlayerTeam(selected, smallestteam, source_team, false);
if(selected.deadflag == DEAD_NO)
Damage(selected, selected, selected, 100000, DEATH_AUTOTEAMCHANGE, selected.origin, '0 0 0');