mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Cleanup if nesting
This commit is contained in:
parent
ce5a7ea626
commit
905204781b
|
@ -36,18 +36,19 @@ void CGameTeams::OnCharacterStart(int ClientID)
|
||||||
{
|
{
|
||||||
pStartingChar->m_DDRaceState = DDRACE_STARTED;
|
pStartingChar->m_DDRaceState = DDRACE_STARTED;
|
||||||
pStartingChar->m_StartTime = Tick;
|
pStartingChar->m_StartTime = Tick;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
bool Waiting = false;
|
bool Waiting = false;
|
||||||
for(int i = 0; i < MAX_CLIENTS; ++i)
|
for(int i = 0; i < MAX_CLIENTS; ++i)
|
||||||
{
|
{
|
||||||
if (m_Core.Team(ClientID) == m_Core.Team(i))
|
if(m_Core.Team(ClientID) != m_Core.Team(i))
|
||||||
{
|
continue;
|
||||||
CPlayer* pPlayer = GetPlayer(i);
|
CPlayer* pPlayer = GetPlayer(i);
|
||||||
if (pPlayer && pPlayer->IsPlaying()
|
if(!pPlayer || !pPlayer->IsPlaying())
|
||||||
&& GetDDRaceState(pPlayer) == DDRACE_FINISHED)
|
continue;
|
||||||
{
|
if(GetDDRaceState(pPlayer) != DDRACE_FINISHED)
|
||||||
|
continue;
|
||||||
|
|
||||||
Waiting = true;
|
Waiting = true;
|
||||||
pStartingChar->m_DDRaceState = DDRACE_NONE;
|
pStartingChar->m_DDRaceState = DDRACE_NONE;
|
||||||
|
|
||||||
|
@ -76,8 +77,6 @@ void CGameTeams::OnCharacterStart(int ClientID)
|
||||||
m_LastChat[i] = Tick;
|
m_LastChat[i] = Tick;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(m_TeamState[m_Core.Team(ClientID)] < TEAMSTATE_STARTED && !Waiting)
|
if(m_TeamState[m_Core.Team(ClientID)] < TEAMSTATE_STARTED && !Waiting)
|
||||||
{
|
{
|
||||||
|
@ -127,7 +126,6 @@ void CGameTeams::OnCharacterStart(int ClientID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void CGameTeams::OnCharacterFinish(int ClientID)
|
void CGameTeams::OnCharacterFinish(int ClientID)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue