1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Refactored player-specific data into single struct BattleState.

This commit is contained in:
Michał W. Urbańczyk
2013-07-21 22:01:29 +00:00
parent 491bd557ef
commit d8a27d8f3c
13 changed files with 212 additions and 137 deletions

View File

@@ -222,13 +222,13 @@ void CBattleQuery::notifyObjectAboutRemoval(const CObjectVisitQuery &objectVisit
CBattleQuery::CBattleQuery(const BattleInfo *Bi)
{
belligerents[0] = Bi->belligerents[0];
belligerents[1] = Bi->belligerents[1];
belligerents[0] = Bi->sides[0].armyObject;
belligerents[1] = Bi->sides[1].armyObject;
bi = Bi;
for(PlayerColor side : bi->sides)
addPlayer(side);
for(auto &side : bi->sides)
addPlayer(side.color);
}
CBattleQuery::CBattleQuery()