BUFFER_LENGTH
This commit is contained in:
parent
f44b6cd7dc
commit
eb7116bac8
@ -128,18 +128,16 @@ int Server::Ready() {
|
||||
|
||||
if (recv(sock, m_buf.ptr, m_buf.len, 0) > 0) {
|
||||
PlayerInfo play;
|
||||
/*
|
||||
|
||||
m_buf.len = BUFFER_LENGTH;
|
||||
Packet pck = getPack(&m_buf);
|
||||
if (pck.type != PACKET_TYPE::LOGINF) {
|
||||
Log("Paquet invalide.", true, false);
|
||||
if (pck.type != PACKET_TYPE::ERR)
|
||||
netprot::emptyPack(pck);
|
||||
continue; // Passer au prochain appel si c'est pas un LoginInfo ou un LoginInfo invalide qui rentre.
|
||||
}*/
|
||||
LoginInfo* log = new LoginInfo();
|
||||
|
||||
m_buf.len = BUFFER_LENGTH;
|
||||
netprot::Deserialize(log, m_buf.ptr, m_buf.len);//(LoginInfo*)pck.ptr;
|
||||
}
|
||||
LoginInfo* log = (LoginInfo*)pck.ptr;
|
||||
|
||||
log->sid = getUniqueId();
|
||||
log->tid = 0; // TODO: À changer si on implemente un mode en equipe.
|
||||
@ -167,7 +165,6 @@ int Server::Ready() {
|
||||
m_players[log->sid] = std::move(conn);
|
||||
|
||||
delete log;
|
||||
log = nullptr;
|
||||
|
||||
if (++nbrconn >= nbrjoueurs)
|
||||
readystart = true;
|
||||
|
Loading…
Reference in New Issue
Block a user