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:
@ -161,6 +161,27 @@ bool LobbyGuiAction::checkClientPermissions(CVCMIServer * srv) const
|
||||
return srv->isClientHost(c->connectionID);
|
||||
}
|
||||
|
||||
bool LobbyEndGame::checkClientPermissions(CVCMIServer * srv) const
|
||||
{
|
||||
return srv->isClientHost(c->connectionID);
|
||||
}
|
||||
|
||||
bool LobbyEndGame::applyOnServer(CVCMIServer * srv)
|
||||
{
|
||||
srv->prepareToRestart();
|
||||
return true;
|
||||
}
|
||||
|
||||
void LobbyEndGame::applyOnServerAfterAnnounce(CVCMIServer * srv)
|
||||
{
|
||||
boost::unique_lock<boost::mutex> stateLock(srv->stateMutex);
|
||||
for(auto & c : srv->connections)
|
||||
{
|
||||
c->enterLobbyConnectionMode();
|
||||
c->disableStackSendingByID();
|
||||
}
|
||||
}
|
||||
|
||||
bool LobbyStartGame::checkClientPermissions(CVCMIServer * srv) const
|
||||
{
|
||||
return srv->isClientHost(c->connectionID);
|
||||
|
Reference in New Issue
Block a user