mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
vcmi: fix map format for teams number
This commit is contained in:
parent
d31a3362af
commit
bcf8ca1268
@ -595,9 +595,9 @@ void CMapFormatJson::readTeams(JsonDeserializer & handler)
|
||||
logGlobal->error("Invalid teams field type");
|
||||
|
||||
mapHeader->howManyTeams = 0;
|
||||
for(int i = 0; i < PlayerColor::PLAYER_LIMIT_I; i++)
|
||||
if(mapHeader->players[i].canComputerPlay || mapHeader->players[i].canHumanPlay)
|
||||
mapHeader->players[i].team = TeamID(mapHeader->howManyTeams++);
|
||||
for(auto & player : mapHeader->players)
|
||||
if(player.canAnyonePlay())
|
||||
player.team = TeamID(mapHeader->howManyTeams++);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user