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

Fix crash on starting random map with random number of players

This commit is contained in:
Ivan Savenko
2024-05-17 18:25:09 +00:00
parent 194b3389f9
commit 004e6d1fcb
2 changed files with 2 additions and 2 deletions

View File

@@ -986,7 +986,7 @@ void CVCMIServer::multiplayerWelcomeMessage()
{
int humanPlayer = 0;
for (auto & pi : si->playerInfos)
if(gh->getPlayerState(pi.first)->isHuman())
if(pi.second.isControlledByHuman())
humanPlayer++;
if(humanPlayer < 2) // Singleplayer