1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-31 22:05:10 +02:00

Add more logging for weird crash on game start

This commit is contained in:
Ivan Savenko 2024-08-02 15:04:07 +00:00
parent 0ac1ef077d
commit c9b6b17422

View File

@ -682,6 +682,15 @@ void CGameHandler::onNewTurn()
}
}
for (auto & player : gs->players)
{
if (player.second.status != EPlayerStatus::INGAME)
continue;
if (player.second.heroes.empty() && player.second.towns.empty())
throw std::runtime_error("Invalid player in player state! Player " + std::to_string(player.first.getNum()) + ", map name: " + gs->map->name.toString() + ", map description: " + gs->map->description.toString());
}
if (newWeek && !firstTurn)
{
n.specialWeek = NewTurn::NORMAL;