1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00

formatting

This commit is contained in:
AlexVinS 2017-07-09 15:49:37 +03:00
parent 7bf8c9bd69
commit 00bd1bd100
2 changed files with 60 additions and 59 deletions

View File

@ -282,8 +282,8 @@ void CHealth::takeResurrected()
} }
///CStack ///CStack
CStack::CStack(const CStackInstance * Base, PlayerColor O, int I, ui8 Side, SlotID S) CStack::CStack(const CStackInstance * Base, PlayerColor O, int I, ui8 Side, SlotID S):
: base(Base), ID(I), owner(O), slot(S), side(Side), base(Base), ID(I), owner(O), slot(S), side(Side),
counterAttacks(this), shots(this), casts(this), health(this), cloneID(-1), counterAttacks(this), shots(this), casts(this), health(this), cloneID(-1),
position() position()
{ {
@ -301,8 +301,8 @@ CStack::CStack():
setNodeType(STACK_BATTLE); setNodeType(STACK_BATTLE);
} }
CStack::CStack(const CStackBasicDescriptor * stack, PlayerColor O, int I, ui8 Side, SlotID S) CStack::CStack(const CStackBasicDescriptor * stack, PlayerColor O, int I, ui8 Side, SlotID S):
: base(nullptr), ID(I), owner(O), slot(S), side(Side), base(nullptr), ID(I), owner(O), slot(S), side(Side),
counterAttacks(this), shots(this), casts(this), health(this), cloneID(-1), counterAttacks(this), shots(this), casts(this), health(this), cloneID(-1),
position() position()
{ {
@ -514,7 +514,8 @@ std::vector<BattleHex> CStack::getSurroundingHexes(BattleHex attackerPos) const
{ {
const int WN = GameConstants::BFIELD_WIDTH; const int WN = GameConstants::BFIELD_WIDTH;
if(side == BattleSide::ATTACKER) if(side == BattleSide::ATTACKER)
{ //position is equal to front hex {
//position is equal to front hex
BattleHex::checkAndPush(hex - ((hex / WN) % 2 ? WN + 2 : WN + 1), hexes); BattleHex::checkAndPush(hex - ((hex / WN) % 2 ? WN + 2 : WN + 1), hexes);
BattleHex::checkAndPush(hex - ((hex / WN) % 2 ? WN + 1 : WN), hexes); BattleHex::checkAndPush(hex - ((hex / WN) % 2 ? WN + 1 : WN), hexes);
BattleHex::checkAndPush(hex - ((hex / WN) % 2 ? WN : WN - 1), hexes); BattleHex::checkAndPush(hex - ((hex / WN) % 2 ? WN : WN - 1), hexes);

View File

@ -239,8 +239,8 @@ public:
assert(isIndependentNode()); assert(isIndependentNode());
h & static_cast<CBonusSystemNode &>(*this); h & static_cast<CBonusSystemNode &>(*this);
h & type; h & type;
h & ID & baseAmount & owner & slot & side & position & state h & ID & baseAmount & owner & slot & side & position & state;
& shots & casts & counterAttacks & health; h & shots & casts & counterAttacks & health;
const CArmedInstance * army = (base ? base->armyObj : nullptr); const CArmedInstance * army = (base ? base->armyObj : nullptr);
SlotID extSlot = (base ? base->armyObj->findStack(base) : SlotID()); SlotID extSlot = (base ? base->armyObj->findStack(base) : SlotID());