mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-02-16 02:30:44 +00:00
Compensate for packet loss
This commit is contained in:
@@ -94,7 +94,8 @@ void UDPClientMain(const std::string& IP, int Port) {
|
|||||||
inet_pton(AF_INET, IP.c_str(), &ToServer->sin_addr);
|
inet_pton(AF_INET, IP.c_str(), &ToServer->sin_addr);
|
||||||
UDPSock = socket(AF_INET, SOCK_DGRAM, 0);
|
UDPSock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (!magic.empty())
|
if (!magic.empty())
|
||||||
UDPSend(magic);
|
for (int i = 0; i < 10; i++)
|
||||||
|
UDPSend(magic);
|
||||||
GameSend("P" + std::to_string(ClientID));
|
GameSend("P" + std::to_string(ClientID));
|
||||||
TCPSend("H", TCPSock);
|
TCPSend("H", TCPSock);
|
||||||
UDPSend("p");
|
UDPSend("p");
|
||||||
|
|||||||
Reference in New Issue
Block a user