1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Finally game restart works

# Conflicts:
#	lib/CGameState.cpp
#	server/CVCMIServer.cpp
This commit is contained in:
nordsoft
2022-09-29 21:08:05 +04:00
parent cbfa125085
commit fea05a4320
9 changed files with 70 additions and 4 deletions

View File

@ -220,7 +220,7 @@ void CVCMIServer::threadAnnounceLobby()
}
}
bool CVCMIServer::prepareToStartGame()
void CVCMIServer::prepareToRestart()
{
if(state == EServerState::GAMEPLAY)
{
@ -237,7 +237,12 @@ bool CVCMIServer::prepareToStartGame()
c->enterLobbyConnectionMode();
c->disableStackSendingByID();
}
boost::unique_lock<boost::recursive_mutex> queueLock(mx);
gh = nullptr;
}
bool CVCMIServer::prepareToStartGame()
{
gh = std::make_shared<CGameHandler>(this);
switch(si->mode)
{