|
@@ -3518,8 +3518,6 @@ void CGameHandler::checkVictoryLossConditionsForPlayer(PlayerColor player)
|
|
|
addStatistics(peg.statistic); // add last turn befor win / loss
|
|
addStatistics(peg.statistic); // add last turn befor win / loss
|
|
|
sendAndApply(peg);
|
|
sendAndApply(peg);
|
|
|
|
|
|
|
|
- turnOrder->onPlayerEndsGame(player);
|
|
|
|
|
-
|
|
|
|
|
if (victoryLossCheckResult.victory())
|
|
if (victoryLossCheckResult.victory())
|
|
|
{
|
|
{
|
|
|
//one player won -> all enemies lost
|
|
//one player won -> all enemies lost
|
|
@@ -3547,6 +3545,9 @@ void CGameHandler::checkVictoryLossConditionsForPlayer(PlayerColor player)
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
|
|
+ // give turn to next player(s)
|
|
|
|
|
+ turnOrder->onPlayerEndsGame(player);
|
|
|
|
|
+
|
|
|
//copy heroes vector to avoid iterator invalidation as removal change PlayerState
|
|
//copy heroes vector to avoid iterator invalidation as removal change PlayerState
|
|
|
auto hlp = p->getHeroes();
|
|
auto hlp = p->getHeroes();
|
|
|
for (auto h : hlp) //eliminate heroes
|
|
for (auto h : hlp) //eliminate heroes
|