- try to fix windows client lag

This commit is contained in:
SoftCoder 2015-12-22 20:40:31 -08:00
parent fd838347a5
commit b3c9140574
1 changed files with 2 additions and 6 deletions

View File

@ -1795,11 +1795,7 @@ void ClientInterface::waitUntilReady(Checksum* checksum) {
// delay the start a bit, so clients have more room to get messages
// This is to ensure clients don't start ahead of the server and thus
// constantly freeze because they are waiting for the server to catch up
#ifdef WIN32
sleep(20);
#else
sleep(120);
#endif
}
// This triggers LAG update packets to begin as required
@ -1926,8 +1922,8 @@ NetworkMessageType ClientInterface::waitForMessage(int waitMicroseconds)
return msg;
}
// Sleep every x milli-seconds we wait to let other threads work
else if(chrono.getMillis() % 20 == 0) {
sleep(5);
else if(chrono.getMillis() % 4 == 0) {
sleep(2);
}
}