mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
@@ -143,6 +143,7 @@ void CServerHandler::resetStateForLobby(const StartInfo::EMode mode, const std::
|
||||
{
|
||||
hostClientId = -1;
|
||||
state = EClientState::NONE;
|
||||
mapToStart = nullptr;
|
||||
th = std::make_unique<CStopWatch>();
|
||||
packsForLobbyScreen.clear();
|
||||
c.reset();
|
||||
@@ -399,6 +400,7 @@ void CServerHandler::sendClientDisconnecting()
|
||||
return;
|
||||
|
||||
state = EClientState::DISCONNECTING;
|
||||
mapToStart = nullptr;
|
||||
LobbyClientDisconnected lcd;
|
||||
lcd.clientId = c->connectionID;
|
||||
logNetwork->info("Connection has been requested to be closed.");
|
||||
@@ -565,6 +567,11 @@ void CServerHandler::sendStartGame(bool allowOnlyAI) const
|
||||
c->disableStackSendingByID();
|
||||
}
|
||||
|
||||
void CServerHandler::startMapAfterConnection(std::shared_ptr<CMapInfo> to)
|
||||
{
|
||||
mapToStart = to;
|
||||
}
|
||||
|
||||
void CServerHandler::startGameplay(VCMI_LIB_WRAP_NAMESPACE(CGameState) * gameState)
|
||||
{
|
||||
if(CMM)
|
||||
@@ -694,7 +701,7 @@ int CServerHandler::howManyPlayerInterfaces()
|
||||
|
||||
ui8 CServerHandler::getLoadMode()
|
||||
{
|
||||
if(state == EClientState::GAMEPLAY)
|
||||
if(loadMode != ELoadMode::TUTORIAL && state == EClientState::GAMEPLAY)
|
||||
{
|
||||
if(si->campState)
|
||||
return ELoadMode::CAMPAIGN;
|
||||
|
||||
Reference in New Issue
Block a user