1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Pass whole gamestate over network

This commit is contained in:
nordsoft
2022-09-28 23:15:05 +04:00
parent 4a7d290112
commit 7ee4fca120
7 changed files with 19 additions and 10 deletions

View File

@@ -516,7 +516,7 @@ void CServerHandler::sendStartGame(bool allowOnlyAI) const
sendLobbyPack(lsg);
}
void CServerHandler::startGameplay()
void CServerHandler::startGameplay(CGameState * gameState)
{
if(CMM)
CMM->disable();
@@ -525,10 +525,10 @@ void CServerHandler::startGameplay()
switch(si->mode)
{
case StartInfo::NEW_GAME:
client->newGame();
client->newGame(gameState);
break;
case StartInfo::CAMPAIGN:
client->newGame();
client->newGame(gameState);
break;
case StartInfo::LOAD_GAME:
client->loadGame();