1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Some progress on private rooms support

This commit is contained in:
Ivan Savenko
2024-02-10 19:02:25 +02:00
parent 4a0dd2da2c
commit 1a144fc516
11 changed files with 68 additions and 21 deletions

View File

@ -997,3 +997,13 @@ void CServerHandler::sendLobbyPack(const CPackForLobby & pack) const
if(getState() != EClientState::STARTING)
c->sendPack(&pack);
}
bool CServerHandler::inLobbyRoom() const
{
return CSH->serverMode == EServerMode::LOBBY_HOST || CSH->serverMode == EServerMode::LOBBY_GUEST;
}
bool CServerHandler::inGame() const
{
return c != nullptr;
}