mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +02:00
* fixed animation of defense / death when unit is attacked twice
* fixed armageddon animation
This commit is contained in:
parent
2d54b31b17
commit
4677d3a338
@ -207,6 +207,7 @@ bool CSpellEffectAnim::init()
|
||||
|
||||
void CSpellEffectAnim::nextFrame()
|
||||
{
|
||||
//notice: there may be more than one effect in owner->battleEffects correcponding to this animation (ie. armageddon)
|
||||
for(std::list<SBattleEffect>::iterator it = owner->battleEffects.begin(); it != owner->battleEffects.end(); ++it)
|
||||
{
|
||||
if(it->effectID == ID)
|
||||
@ -223,7 +224,6 @@ void CSpellEffectAnim::nextFrame()
|
||||
it->x += dx;
|
||||
it->y += dy;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -404,7 +404,8 @@ bool CDefenceAnim::init()
|
||||
int lowestMoveID = owner->animIDhelper + 5;
|
||||
for(std::list<std::pair<CBattleAnimation *, bool> >::iterator it = owner->pendingAnims.begin(); it != owner->pendingAnims.end(); ++it)
|
||||
{
|
||||
if(dynamic_cast<CDefenceAnim *>(it->first))
|
||||
CDefenceAnim * defAnim = dynamic_cast<CDefenceAnim *>(it->first);
|
||||
if(defAnim && defAnim->stackID != stackID)
|
||||
continue;
|
||||
|
||||
CBattleAttack * attAnim = dynamic_cast<CBattleAttack *>(it->first);
|
||||
|
Loading…
x
Reference in New Issue
Block a user