WIP Packet loss identification. Put packetID in message

This commit is contained in:
stiffly
2015-12-09 17:43:36 +01:00
parent 0807a7d0ae
commit 4de613814b
7 changed files with 51 additions and 7 deletions
+5
View File
@@ -42,12 +42,17 @@ private:
void ParseServerPing();
void ParseSnapshot(char* data, size_t length);
void CreateNewPlayer(int i);
void IdentifyPacketLoss();
// udp stuff
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
boost::asio::io_service m_IOService;
boost::asio::ip::udp::socket m_Socket;
// Packet loss logic
unsigned int m_PacketID = 0;
unsigned int m_PreviousPacketID = 0;
World* m_World;
int m_PlayerID = -1;
glm::vec2 m_PlayerPositions[MAXCONNECTIONS];