This commit is contained in:
MarcEricMartel 2023-10-23 16:23:27 -04:00
parent 498fb7baf7
commit 9f615db929
2 changed files with 2 additions and 5 deletions

View File

@ -7,6 +7,8 @@
#define SRV_PORT 1025
#define CLI_PORT 1026
#define BUFFER_LENGTH 150
#define CHUNK_SIZE_X 4
#define CHUNK_SIZE_Y 64
#define CHUNK_SIZE_Z 4

View File

@ -141,17 +141,12 @@ int Server::Ready() {
str.append(log.name).append(" SID: [").append(std::to_string(log.sid).append("]"));
Log(str, false, false);
//netprot::Serialize(&log, &buf, &buflen);
//send(sock, buf, buflen, 0);
//buflen = 150;
netprot::sendPack<netprot::LoginInfo>(sock, &log, &buf, &buflen);
play.id = getUniqueId();
memcpy(play.name, log.name, std::strlen(log.name) + 1);
play.tid = log.tid;
//netprot::Serialize(&m_game, &buf, &buflen);
//send(sock, buf, buflen, 0);
netprot::sendPack<netprot::GameInfo>(sock, &m_game, &buf, &buflen);
Connection* conn = new Connection(sock, sockad, log, play);