1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Fix assertion failure in RMG

This commit is contained in:
Ivan Savenko 2023-11-28 16:37:21 +02:00
parent ea8995e901
commit 0d6bd0c60a

View File

@ -313,8 +313,8 @@ void CMapGenOptions::resetPlayersMap()
while (players.size() < realPlayersCnt && !availableColors.empty())
{
auto color = availableColors.front();
setPlayerTypeForStandardPlayer(color, EPlayerType::AI);
players[color].setColor(color);
setPlayerTypeForStandardPlayer(color, EPlayerType::AI);
availableColors.erase(availableColors.begin());
if (vstd::contains(savedPlayerSettings, color))