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

Fix some of the new warnings from sonarcloud

This commit is contained in:
Ivan Savenko
2024-10-10 20:31:11 +00:00
parent 1fc0267ad1
commit a8e84c55f6
27 changed files with 66 additions and 84 deletions

View File

@@ -299,17 +299,12 @@ void CVCMIServer::onDisconnected(const std::shared_ptr<INetworkConnection> & con
std::shared_ptr<CConnection> c = findConnection(connection);
// player may have already disconnected via clientDisconnected call
if (c)
if (c && gh && getState() == EServerState::GAMEPLAY)
{
//clientDisconnected(c);
if(gh && getState() == EServerState::GAMEPLAY)
{
LobbyClientDisconnected lcd;
lcd.c = c;
lcd.clientId = c->connectionID;
handleReceivedPack(lcd);
}
LobbyClientDisconnected lcd;
lcd.c = c;
lcd.clientId = c->connectionID;
handleReceivedPack(lcd);
}
}