1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

[WiP] Fix one case of bonus node copying.

This commit is contained in:
AlexVinS
2015-10-25 23:44:25 +03:00
committed by AlexVinS
parent 89ce1a4509
commit b3e7e2e04a

View File

@@ -1075,13 +1075,14 @@ void CGameState::initPlayerStates()
logGlobal->debug("\tCreating player entries in gs");
for(auto & elem : scenarioOps->playerInfos)
{
std::pair<PlayerColor, PlayerState> ins(elem.first,PlayerState());
ins.second.color=ins.first;
ins.second.human = elem.second.playerID;
ins.second.team = map->players[ins.first.getNum()].team;
teams[ins.second.team].id = ins.second.team;//init team
teams[ins.second.team].players.insert(ins.first);//add player to team
players.insert(ins);
PlayerState & p = players[elem.first];
//std::pair<PlayerColor, PlayerState> ins(elem.first,PlayerState());
p.color=elem.first;
p.human = elem.second.playerID;
p.team = map->players[elem.first.getNum()].team;
teams[p.team].id = p.team;//init team
teams[p.team].players.insert(elem.first);//add player to team
//players.insert(ins);
}
}