mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Refactor team state unpacking
This commit is contained in:
parent
dfe0ec3385
commit
21636912c0
|
@ -810,18 +810,10 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker, int Conn, bool Dumm
|
|||
|
||||
for(i = 0; i < MAX_CLIENTS; i++)
|
||||
{
|
||||
int Team = pUnpacker->GetInt();
|
||||
bool WentWrong = false;
|
||||
|
||||
if(pUnpacker->Error())
|
||||
WentWrong = true;
|
||||
|
||||
if(!WentWrong && Team >= TEAM_FLOCK && Team <= TEAM_SUPER)
|
||||
const int Team = pUnpacker->GetInt();
|
||||
if(!pUnpacker->Error() && Team >= TEAM_FLOCK && Team <= TEAM_SUPER)
|
||||
m_Teams.Team(i, Team);
|
||||
else
|
||||
WentWrong = true;
|
||||
|
||||
if(WentWrong)
|
||||
{
|
||||
m_Teams.Team(i, 0);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue