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:
parent
0ac1ef077d
commit
c9b6b17422
@ -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)
|
if (newWeek && !firstTurn)
|
||||||
{
|
{
|
||||||
n.specialWeek = NewTurn::NORMAL;
|
n.specialWeek = NewTurn::NORMAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user