1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Simplified connection logic

This commit is contained in:
Ivan Savenko
2023-12-25 22:56:55 +02:00
parent 8ea69e457a
commit 5694777a96
4 changed files with 15 additions and 42 deletions

View File

@@ -43,7 +43,12 @@ void ApplyOnLobbyHandlerNetPackVisitor::visitLobbyClientConnected(LobbyClientCon
if(handler.mapToStart)
handler.setMapInfo(handler.mapToStart);
else if(!settings["session"]["headless"].Bool())
{
if (GH.windows().topWindow<CSimpleJoinScreen>())
GH.windows().popWindows(1);
GH.windows().createAndPushWindow<CLobbyScreen>(static_cast<ESelectionScreen>(handler.screenType));
}
handler.state = EClientState::LOBBY;
}
}