1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-06 23:26:26 +02:00

Compile fix.

This commit is contained in:
Frank Zago 2011-09-13 01:45:28 +00:00
parent e9991f7932
commit 4dedfcabd1

View File

@ -782,7 +782,7 @@ std::set<CStack*> BattleInfo::getAttackedCreatures(const CSpell * s, int skillLe
void BattleInfo::getPotentiallyAttackableHexes(AttackableTiles &at, const CStack* attacker, THex destinationTile, THex attackerPos) void BattleInfo::getPotentiallyAttackableHexes(AttackableTiles &at, const CStack* attacker, THex destinationTile, THex attackerPos)
{ {
const int WN = BFIELD_WIDTH; const int WN = BFIELD_WIDTH;
ui16 hex = (attackerPos != THex::INVALID) ? attackerPos : attacker->position.hex; //real or hypothetical (cursor) position ui16 hex = (attackerPos != THex::INVALID) ? attackerPos.hex : attacker->position.hex; //real or hypothetical (cursor) position
if (attacker->hasBonusOfType(Bonus::ATTACKS_ALL_ADJACENT)) if (attacker->hasBonusOfType(Bonus::ATTACKS_ALL_ADJACENT))
{ {
std::vector<THex> hexes = attacker->getSurroundingHexes(attackerPos); std::vector<THex> hexes = attacker->getSurroundingHexes(attackerPos);
@ -2446,7 +2446,7 @@ bool CStack::coversPos(THex pos) const
std::vector<THex> CStack::getSurroundingHexes(THex attackerPos) const std::vector<THex> CStack::getSurroundingHexes(THex attackerPos) const
{ {
THex hex = (attackerPos != THex::INVALID) ? attackerPos : position.hex; //use hypothetical position THex hex = (attackerPos != THex::INVALID) ? attackerPos : position; //use hypothetical position
std::vector<THex> hexes; std::vector<THex> hexes;
if (doubleWide()) if (doubleWide())
{ {