Redesign loading solution

This commit is contained in:
nordsoft committed 2023-08-22 20:10:20 +04:00
1 parent d9a2a7bfd0
commit dfaf778d16
10 files changed
+105 -32

No files matched your search

+1 -3
View File
@@ -289,9 +289,6 @@ void ApplyOnServerNetPackVisitor::visitLobbyStartGame(LobbyStartGame & pack)
result = false;
return;
}
// Announce loading
std::unique_ptr<LobbyLoadProgress> loadProgress(new LobbyLoadProgress);
srv.addToAnnounceQueue(std::move(loadProgress));
// Server will prepare gamestate and we announce StartInfo to clients
if(!srv.prepareToStartGame())
@@ -303,6 +300,7 @@ void ApplyOnServerNetPackVisitor::visitLobbyStartGame(LobbyStartGame & pack)
pack.initializedStartInfo = std::make_shared<StartInfo>(*srv.gh->getStartInfo(true));
pack.initializedGameState = srv.gh->gameState();
srv.state = EServerState::GAMEPLAY_STARTING;
result = true;
}