mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 02:40:17 +02:00
- try to fix windows client lag
This commit is contained in:
@@ -1795,11 +1795,7 @@ void ClientInterface::waitUntilReady(Checksum* checksum) {
|
|||||||
// delay the start a bit, so clients have more room to get messages
|
// 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
|
// 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
|
// constantly freeze because they are waiting for the server to catch up
|
||||||
#ifdef WIN32
|
|
||||||
sleep(20);
|
|
||||||
#else
|
|
||||||
sleep(120);
|
sleep(120);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This triggers LAG update packets to begin as required
|
// This triggers LAG update packets to begin as required
|
||||||
@@ -1926,8 +1922,8 @@ NetworkMessageType ClientInterface::waitForMessage(int waitMicroseconds)
|
|||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
// Sleep every x milli-seconds we wait to let other threads work
|
// Sleep every x milli-seconds we wait to let other threads work
|
||||||
else if(chrono.getMillis() % 20 == 0) {
|
else if(chrono.getMillis() % 4 == 0) {
|
||||||
sleep(5);
|
sleep(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user