Fix host crash when someone leaves pre-game lobby screen.

Broke in 2ad6ff0855.
master
Cyp 2010-11-30 22:27:19 +01:00
parent ba1bbcfb37
commit e26882b446
2 changed files with 6 additions and 1 deletions

View File

@ -235,7 +235,11 @@ BOOL MultiPlayerLeave(UDWORD playerIndex)
ssprintf(buf, _("%s has Left the Game"), getPlayerName(playerIndex));
if (NetPlay.isHost)
if (ingame.localJoiningInProgress)
{
clearPlayer(playerIndex, false);
}
else if (NetPlay.isHost) // If hosting, and game has started (not in pre-game lobby screen, that is).
{
sendPlayerLeft(playerIndex);
}

View File

@ -846,6 +846,7 @@ BOOL recvMessage(void)
break;
case GAME_PLAYER_LEFT:
recvPlayerLeft(queue);
break;
default:
processedMessage2 = false;
break;