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

Minor fixes and corrections to network-related code. No functionality

changes.
This commit is contained in:
Ivan Savenko
2024-02-12 18:57:20 +02:00
parent dc8d48a3b6
commit 7c34d48258
5 changed files with 28 additions and 29 deletions

View File

@@ -206,8 +206,8 @@ void ApplyOnServerNetPackVisitor::visitLobbyRestartGame(LobbyRestartGame & pack)
void ApplyOnServerAfterAnnounceNetPackVisitor::visitLobbyRestartGame(LobbyRestartGame & pack)
{
for(const auto & c : srv.activeConnections)
c->enterLobbyConnectionMode();
for(const auto & connection : srv.activeConnections)
connection->enterLobbyConnectionMode();
}
void ClientPermissionsCheckerNetPackVisitor::visitLobbyPrepareStartGame(LobbyPrepareStartGame & pack)
@@ -250,11 +250,11 @@ void ApplyOnServerAfterAnnounceNetPackVisitor::visitLobbyStartGame(LobbyStartGam
srv.startGameImmediately();
else
{
for(const auto & c : srv.activeConnections)
for(const auto & connection : srv.activeConnections)
{
if(c->connectionID == pack.clientId)
if(connection->connectionID == pack.clientId)
{
c->enterGameplayConnectionMode(srv.gh->gameState());
connection->enterGameplayConnectionMode(srv.gh->gameState());
srv.reconnectPlayer(pack.clientId);
}
}