mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Improve readability by renaming variable and changing condition
Rename variable `i` to `Conn`. Check for `CONN_MAIN` and `CONN_DUMMY` explicitly instead of using numeric index.
This commit is contained in:
parent
9e5369bc9d
commit
87f9ccdb22
|
@ -2284,20 +2284,19 @@ void CClient::PumpNetwork()
|
|||
|
||||
// process packets
|
||||
CNetChunk Packet;
|
||||
for(int i = 0; i < NUM_CONNS; i++)
|
||||
for(int Conn = 0; Conn < NUM_CONNS; Conn++)
|
||||
{
|
||||
while(m_aNetClient[i].Recv(&Packet))
|
||||
while(m_aNetClient[Conn].Recv(&Packet))
|
||||
{
|
||||
if(Packet.m_ClientId == -1)
|
||||
{
|
||||
ProcessConnlessPacket(&Packet);
|
||||
continue;
|
||||
}
|
||||
if(i > 1)
|
||||
if(Conn == CONN_MAIN || Conn == CONN_DUMMY)
|
||||
{
|
||||
continue;
|
||||
ProcessServerPacket(&Packet, Conn, g_Config.m_ClDummy ^ Conn);
|
||||
}
|
||||
ProcessServerPacket(&Packet, i, g_Config.m_ClDummy ^ i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue