1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Reconnection works

This commit is contained in:
nordsoft
2022-10-04 05:42:14 +04:00
parent 16a5414247
commit 722acb2a1d
3 changed files with 18 additions and 3 deletions

View File

@@ -353,8 +353,9 @@ void PlayerReinitInterface::applyCl(CClient * cl)
plSettings.connectedPlayerIDs.clear();
cl->initPlayerEnvironments();
cl->initPlayerInterfaces();
if(cl->gameState()->currentPlayer == player)
callOnlyThatInterface(cl, player, &CGameInterface::yourTurn);
auto currentPlayer = cl->gameState()->currentPlayer;
callAllInterfaces(cl, &IGameEventsReceiver::playerStartsTurn, currentPlayer);
callOnlyThatInterface(cl, currentPlayer, &CGameInterface::yourTurn);
}
else if(playerConnectionId == CSH->c->connectionID)
{