Cleanup + client.
This commit is contained in:
parent
34976ef7ec
commit
3da68297e4
@ -258,7 +258,7 @@ void Server::Run() {
|
||||
|
||||
/* In */
|
||||
|
||||
Input in; Chat chat; Sync sync;
|
||||
Input in; Sync sync;
|
||||
|
||||
recvPacks(m_sock_udp, &m_buf, &lsPck);
|
||||
for (auto& pck : lsPck) {
|
||||
@ -274,10 +274,6 @@ void Server::Run() {
|
||||
case SYNC:
|
||||
if (Deserialize(&sync, pck, &bsize)) {}
|
||||
break;
|
||||
case CHAT:
|
||||
//if (Deserialize(&chat, pck, &bsize))
|
||||
//chatlog.push_back(chat);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ int Connector::Connect(const char* srv_addr, std::string name) {
|
||||
int errors = 0;
|
||||
std::vector<char*> lsPck;
|
||||
while (!ready) {
|
||||
lsPck = netprot::recvPacks(m_sock_udp, &bf);
|
||||
netprot::recvPacks(m_sock_udp, &bf, &lsPck);
|
||||
|
||||
for (auto& pck : lsPck) {
|
||||
uint32_t bsize = bf.len - (pck - bf.ptr);
|
||||
|
@ -1387,7 +1387,7 @@ void Engine::Render(float elapsedTime) {
|
||||
|
||||
sendPackTo<Input>(m_conn.m_sock_udp, &input, &m_bufout, &m_conn.m_srvsockaddr);
|
||||
|
||||
lsPck = recvPacks(m_conn.m_sock_udp, &m_buf);
|
||||
recvPacks(m_conn.m_sock_udp, &m_buf, &lsPck);
|
||||
char* prevptr = nullptr;
|
||||
for (auto& pck : lsPck) { // We could make a few threads out of this.
|
||||
Sync sync; Output out; ChunkMod cmod; BulletAdd bull; Chat chat;
|
||||
|
Loading…
Reference in New Issue
Block a user