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:
@ -93,12 +93,21 @@ void LobbyGuiAction::applyOnLobbyScreen(CLobbyScreen * lobby, CServerHandler * h
|
||||
}
|
||||
}
|
||||
|
||||
bool LobbyStartGame::applyOnLobbyHandler(CServerHandler * handler)
|
||||
bool LobbyEndGame::applyOnLobbyHandler(CServerHandler * handler)
|
||||
{
|
||||
if(handler->state == EClientState::GAMEPLAY)
|
||||
{
|
||||
handler->endGameplay(false, true);
|
||||
handler->endGameplay(closeConnection, restart);
|
||||
}
|
||||
|
||||
if(restart)
|
||||
handler->sendStartGame();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LobbyStartGame::applyOnLobbyHandler(CServerHandler * handler)
|
||||
{
|
||||
handler->state = EClientState::STARTING;
|
||||
if(handler->si->mode != StartInfo::LOAD_GAME)
|
||||
{
|
||||
|
Reference in New Issue
Block a user