PATATE PLAY
This commit is contained in:
parent
35c55f2e26
commit
bd3f677118
@ -50,12 +50,8 @@ sockaddr_in* Connection::getAddr() const { return (sockaddr_in*)&m_addr; }
|
||||
void Connection::getPacks(SOCKET sock) {
|
||||
std::vector<char*> lsPck;
|
||||
Input in;
|
||||
while (true) {
|
||||
lsPck = recvPacksFrom(sock, &m_buf, m_addr);
|
||||
|
||||
if (lsPck.empty() && !m_buf.tmp)
|
||||
break;
|
||||
|
||||
for (auto& pck : lsPck) {
|
||||
uint32_t bsize = m_buf.len - (pck - m_buf.ptr);
|
||||
switch (netprot::getType(pck, 1)) {
|
||||
@ -70,7 +66,6 @@ void Connection::getPacks(SOCKET sock) {
|
||||
}
|
||||
}
|
||||
lsPck.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void Connection::sendPacks(SOCKET sock, std::unordered_map<uint64_t, Connection*> conns) {
|
||||
|
@ -108,7 +108,7 @@ private:
|
||||
|
||||
//Menu
|
||||
enum class GameState: uint8_t { MAIN_MENU, OPTIONS, QUIT, NEWG, PLAY, PAUSE };
|
||||
GameState m_gamestate = GameState::MAIN_MENU;
|
||||
GameState m_gamestate = GameState::PLAY;
|
||||
Texture MenuTitleTexture;
|
||||
Texture MenuBGTexture;
|
||||
Texture MenuStartTexture;
|
||||
|
Loading…
Reference in New Issue
Block a user