1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Client-side support for hosting game server via lobby

This commit is contained in:
Ivan Savenko
2024-01-10 15:31:11 +02:00
parent 47f72af556
commit ffa58152ac
14 changed files with 283 additions and 108 deletions

View File

@@ -94,7 +94,7 @@ class CServerHandler : public IServerAPI, public LobbyInfo, public INetworkClien
std::shared_ptr<HighScoreCalculation> highScoreCalc;
void threadRunNetwork();
void threadRunServer();
void threadRunServer(bool connectToLobby);
void onServerFinished();
void sendLobbyPack(const CPackForLobby & pack) const override;
@@ -137,7 +137,7 @@ public:
~CServerHandler();
void resetStateForLobby(const StartInfo::EMode mode, const std::vector<std::string> * names = nullptr);
void startLocalServerAndConnect();
void startLocalServerAndConnect(bool connectToLobby);
void connectToServer(const std::string & addr, const ui16 port);
GlobalLobbyClient & getGlobalLobby();