{
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_defender_team));
+ Player_SetTeamIndex(lowest_player, surv_defender_team);
surv_autobalance = saved_autobalance;
return true;
}
{
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_defender_team));
+ Player_SetTeamIndex(lowest_player, surv_defender_team);
surv_autobalance = saved_autobalance;
}
return true;
return true;
}
LOG_TRACE("No space for defender, switching to attacker");
- SetPlayerTeamSimple(player, Team_IndexToTeam(
- surv_attacker_team));
+ Player_SetTeamIndex(player, surv_attacker_team);
return false;
}
LOG_TRACE("Client is not a bot");
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
- SetPlayerTeamSimple(bot, Team_IndexToTeam(surv_attacker_team));
+ Player_SetTeamIndex(bot, surv_attacker_team);
surv_autobalance = saved_autobalance;
surv_announcefrags = true;
LOG_TRACE("Removed bot");
{
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_attacker_team));
+ Player_SetTeamIndex(lowest_player, surv_attacker_team);
surv_autobalance = saved_autobalance;
return true;
}
{
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_attacker_team));
+ Player_SetTeamIndex(lowest_player, surv_attacker_team);
surv_autobalance = saved_autobalance;
}
return true;
{
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_attacker_team));
+ Player_SetTeamIndex(lowest_player, surv_attacker_team);
surv_autobalance = saved_autobalance;
return;
}
}
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_attacker_team));
+ Player_SetTeamIndex(lowest_player, surv_attacker_team);
surv_autobalance = saved_autobalance;
return;
}
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_defender_team));
+ Player_SetTeamIndex(lowest_player, surv_defender_team);
surv_autobalance = saved_autobalance;
surv_announcefrags = true;
return;
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_defender_team));
+ Player_SetTeamIndex(lowest_player, surv_defender_team);
surv_autobalance = saved_autobalance;
surv_announcefrags = true;
return;
bool saved_autobalance = surv_autobalance;
surv_autobalance = false;
surv_announcefrags = false;
- SetPlayerTeamSimple(lowest_player, Team_IndexToTeam(
- surv_defender_team));
+ Player_SetTeamIndex(lowest_player, surv_defender_team);
surv_autobalance = saved_autobalance;
surv_announcefrags = true;
return;
if (Surv_IsPlayerDefender(it) && (it.surv_role ==
SURVIVAL_ROLE_CANNON_FODDER))
{
- SetPlayerTeamSimple(it, Team_IndexToTeam(surv_attacker_team));
+ Player_SetTeamIndex(it, surv_attacker_team);
}
});
FOREACH_CLIENT(IS_REAL_CLIENT(it),