PATATE PLAY

This commit is contained in:
MarcEricMartel 2023-11-24 15:11:16 -05:00
parent 35c55f2e26
commit bd3f677118
2 changed files with 1 additions and 6 deletions

View File

@ -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) {

View File

@ -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;