mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +02:00
Fixed #2311
This commit is contained in:
parent
641aa13526
commit
3c4f7ec126
@ -4808,10 +4808,12 @@ void CGameHandler::checkVictoryLossConditionsForPlayer(PlayerColor player)
|
|||||||
|
|
||||||
//eliminating one player may cause victory of another:
|
//eliminating one player may cause victory of another:
|
||||||
std::set<PlayerColor> playerColors;
|
std::set<PlayerColor> playerColors;
|
||||||
for (auto p : gs->players) //FIXME: players may have different colors, iterate by over players and not integers
|
|
||||||
|
//do not copy player state (CBonusSystemNode) by value
|
||||||
|
for (auto p = gs->players.begin(); p != gs->players.end(); p++) //players may have different colors, iterate over players and not integers
|
||||||
{
|
{
|
||||||
if (p.first != player)
|
if (p->first != player)
|
||||||
playerColors.insert(p.first);
|
playerColors.insert(p->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
//notify all players
|
//notify all players
|
||||||
|
Loading…
x
Reference in New Issue
Block a user