Possibly Fixed a Teams bug

This commit is contained in:
GreYFoX 2011-02-23 08:18:38 +02:00
parent 0209ef4126
commit 48b29bebd4

View file

@ -60,9 +60,10 @@ void CGameTeams::OnCharacterStart(int ClientID)
else else
{ {
bool Waiting = false; bool Waiting = false;
if(Count(Team) > 1)
for(int i = 0; i < MAX_CLIENTS; ++i) for(int i = 0; i < MAX_CLIENTS; ++i)
{ {
if(Team == m_Core.Team(i)) if(i != ClientID && Team == m_Core.Team(i))
{ {
CCharacter* pChar = Character(i); CCharacter* pChar = Character(i);
if(pChar && pChar->IsAlive() && pChar->m_DDRaceState == DDRACE_FINISHED) if(pChar && pChar->IsAlive() && pChar->m_DDRaceState == DDRACE_FINISHED)
@ -174,6 +175,8 @@ void CGameTeams::OnCharacterDeath(int ClientID)
if((!g_Config.m_SvStickyTeams && m_Core.Team(ClientID) != TEAM_FLOCK) || m_Core.Team(ClientID) == TEAM_SUPER) if((!g_Config.m_SvStickyTeams && m_Core.Team(ClientID) != TEAM_FLOCK) || m_Core.Team(ClientID) == TEAM_SUPER)
SetForceCharacterTeam(ClientID, 0); SetForceCharacterTeam(ClientID, 0);
m_TeeFinished[ClientID] = false;
} }
int CGameTeams::SetCharacterTeam(int ClientID, int Team) int CGameTeams::SetCharacterTeam(int ClientID, int Team)