- bugfixes for in game joining

This commit is contained in:
Mark Vejvoda
2013-02-17 07:15:01 +00:00
parent e771b53f1c
commit 54c026bb3e
11 changed files with 235 additions and 137 deletions

View File

@@ -634,13 +634,14 @@ void ClientInterface::updateLobby() {
break;
case nmtReady:
{
{
NetworkMessageReady networkMessageReady;
if(receiveMessage(&networkMessageReady)) {
this->readyForInGameJoin = true;
}
break;
}
}
break;
case nmtCommandList:
{
@@ -1332,17 +1333,19 @@ void ClientInterface::waitUntilReady(Checksum* checksum) {
return;
}
joinGameInProgress = false;
//printf("Client signalServerWhenReadyToStartJoinedGame = %d\n",signalServerWhenReadyToStartJoinedGame);
if(signalServerWhenReadyToStartJoinedGame == true) {
NetworkMessageReady networkMessageReady;
sendMessage(&networkMessageReady);
}
joinGameInProgress = false;
// 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
sleep(120);
else {
// 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
sleep(120);
}
// This triggers LAG update packets to begin as required
lastNetworkCommandListSendTime = time(NULL);