mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 11:42:31 +01:00
- try to fix windows client lag
This commit is contained in:
parent
fd838347a5
commit
b3c9140574
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user