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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user