// # of bots on those teams
float cb1, cb2, cb3, cb4;
-float audit_teams_time;
+//float audit_teams_time;
void TeamchangeFrags(entity e)
{
return "Neutral Team";
}
-void dom_init();
void runematch_init();
void tdm_init();
void entcs_init();
ActivateTeamplay();
fraglimit_override = autocvar_g_domination_point_limit;
leadlimit_override = autocvar_g_domination_point_leadlimit;
- dom_init();
+ MUTATOR_ADD(gamemode_domination);
have_team_spawns = -1; // request team spawns
}
if(autocvar_bot_vs_human > 0)
{
// bots are all blue
- if(clienttype(for_whom) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(for_whom))
c1 = c3 = c4 = -1;
else
c2 = -1;
else
{
// bots are all red
- if(clienttype(for_whom) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(for_whom))
c2 = c3 = c4 = -1;
else
c1 = -1;
FOR_EACH_CLIENT(head)
{
float t;
- if(head.classname == "player")
+ if(IS_PLAYER(head))
t = head.team;
else if(head.team_forced > 0)
t = head.team_forced; // reserve the spot
if(head != ignore)// && head.netname != "")
{
value = PlayerValue(head);
- if(clienttype(head) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(head))
bvalue = value;
else
bvalue = 0;
if(ta == tb)
return TRUE;
- if(clienttype(e) == CLIENTTYPE_REAL)
+ if(IS_REAL_CLIENT(e))
{
if(bots_would_leave)
{
if(totalteams <= 1)
{
- if(autocvar_g_campaign && pl && clienttype(pl) == CLIENTTYPE_REAL)
+ if(autocvar_g_campaign && pl && IS_REAL_CLIENT(pl))
return 1; // special case for campaign and player joining
else if(g_domination)
error("Too few teams available for domination\n");
//void() ctf_playerchanged;
void SV_ChangeTeam(float _color)
{
- float scolor, dcolor, steam, dteam, dbotcount, scount, dcount;
+ float scolor, dcolor, steam, dteam; //, dbotcount, scount, dcount;
// in normal deathmatch we can just apply the color and we're done
if(!teamplay) {
// bprint("allow change teams from ", ftos(steam), " to ", ftos(dteam), "\n");
- if(self.classname == "player" && steam != dteam)
+ if(IS_PLAYER(self) && steam != dteam)
{
// reduce frags during a team change
TeamchangeFrags(self);
SetPlayerTeam(self, dteam, steam, FALSE);
- if(self.classname == "player" && steam != dteam)
+ if(IS_PLAYER(self) && steam != dteam)
{
// kill player when changing teams
if(self.deadflag == DEAD_NO)