Don't clamp team quietly, but crash on invalid team

This commit is contained in:
Dennis Felsing 2022-01-31 13:29:11 +01:00
parent 3078d9dcfc
commit 3aa29a9ea3

View file

@ -20,7 +20,8 @@ int CTeamsCore::Team(int ClientID) const
void CTeamsCore::Team(int ClientID, int Team)
{
m_Team[ClientID] = clamp(Team, (int)TEAM_FLOCK, (int)TEAM_SUPER);
dbg_assert(Team >= TEAM_FLOCK && Team <= TEAM_SUPER, "invalid team");
m_Team[ClientID] = Team;
}
bool CTeamsCore::CanKeepHook(int ClientID1, int ClientID2) const