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

* fix for bug 288 (and maybe other related bugs)

This commit is contained in:
mateuszb
2009-12-20 11:49:43 +00:00
parent d037bec1be
commit 08c7541076
3 changed files with 19 additions and 19 deletions

View File

@ -1146,10 +1146,10 @@ void CPlayerInterface::battleAttack(BattleAttack *ba)
if(ba->shot())
{
for(std::set<BattleStackAttacked>::iterator i = ba->bsa.begin(); i != ba->bsa.end(); i++)
battleInt->stackIsShooting(ba->stackAttacking,cb->battleGetPos(i->stackAttacked));
battleInt->stackIsShooting(ba->stackAttacking,cb->battleGetPos(i->stackAttacked), i->stackAttacked);
}
else
{
{//WARNING: does not support multiple attacked creatures
const CStack * attacker = cb->battleGetStackByID(ba->stackAttacking);
int shift = 0;
if(ba->counter() && BattleInfo::mutualPosition(curAction->destinationTile, attacker->position) < 0)
@ -1159,7 +1159,7 @@ void CPlayerInterface::battleAttack(BattleAttack *ba)
else
shift = -1;
}
battleInt->stackAttacking( ba->stackAttacking, ba->counter() ? curAction->destinationTile + shift : curAction->additionalInfo );
battleInt->stackAttacking( ba->stackAttacking, ba->counter() ? curAction->destinationTile + shift : curAction->additionalInfo, ba->bsa.begin()->stackAttacked );
}
}