1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Handling of area attack animation & effect

This commit is contained in:
DjWarmonger
2011-07-02 17:40:33 +00:00
parent 4f24501cae
commit 81180de8be
2 changed files with 9 additions and 2 deletions

View File

@@ -835,11 +835,14 @@ void CPlayerInterface::battleAttack(const BattleAttack *ba)
for(std::vector<BattleStackAttacked>::const_iterator i = ba->bsa.begin(); i != ba->bsa.end(); i++)
{
const CStack * attacked = cb->battleGetStackByID(i->stackAttacked);
battleInt->stackAttacking(attacker, cb->battleGetPos(i->stackAttacked), attacked, true);
if (!i->isSecondary()) //display projectile only for primary target
{
battleInt->stackAttacking(attacker, cb->battleGetPos(i->stackAttacked), attacked, true);
}
}
}
else
{//WARNING: does not support multiple attacked creatures
{//TODO: support multiple attacked creatures
int shift = 0;
if(ba->counter() && THex::mutualPosition(curAction->destinationTile, attacker->position) < 0)
{