1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

GameHandler now uses GameConnectionID instead of connection pointers

This commit is contained in:
Ivan Savenko
2025-06-29 16:13:56 +03:00
parent 3576efc3f3
commit 52da332640
32 changed files with 238 additions and 363 deletions

View File

@@ -152,14 +152,8 @@ void ApplyOnLobbyHandlerNetPackVisitor::visitLobbyPrepareStartGame(LobbyPrepareS
void ApplyOnLobbyHandlerNetPackVisitor::visitLobbyStartGame(LobbyStartGame & pack)
{
if(pack.clientId != -1 && pack.clientId != handler.logicConnection->connectionID)
{
result = false;
return;
}
handler.setState(EClientState::STARTING);
if(handler.si->mode != EStartMode::LOAD_GAME || pack.clientId == handler.logicConnection->connectionID)
if(handler.si->mode != EStartMode::LOAD_GAME)
{
auto modeBackup = handler.si->mode;
handler.si = pack.initializedStartInfo;