mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
[WiP] Fix one case of bonus node copying.
This commit is contained in:
@@ -1075,13 +1075,14 @@ void CGameState::initPlayerStates()
|
|||||||
logGlobal->debug("\tCreating player entries in gs");
|
logGlobal->debug("\tCreating player entries in gs");
|
||||||
for(auto & elem : scenarioOps->playerInfos)
|
for(auto & elem : scenarioOps->playerInfos)
|
||||||
{
|
{
|
||||||
std::pair<PlayerColor, PlayerState> ins(elem.first,PlayerState());
|
PlayerState & p = players[elem.first];
|
||||||
ins.second.color=ins.first;
|
//std::pair<PlayerColor, PlayerState> ins(elem.first,PlayerState());
|
||||||
ins.second.human = elem.second.playerID;
|
p.color=elem.first;
|
||||||
ins.second.team = map->players[ins.first.getNum()].team;
|
p.human = elem.second.playerID;
|
||||||
teams[ins.second.team].id = ins.second.team;//init team
|
p.team = map->players[elem.first.getNum()].team;
|
||||||
teams[ins.second.team].players.insert(ins.first);//add player to team
|
teams[p.team].id = p.team;//init team
|
||||||
players.insert(ins);
|
teams[p.team].players.insert(elem.first);//add player to team
|
||||||
|
//players.insert(ins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user