mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
* fixed animation of defense / death when unit is attacked twice
* fixed armageddon animation
This commit is contained in:
@@ -207,6 +207,7 @@ bool CSpellEffectAnim::init()
|
|||||||
|
|
||||||
void CSpellEffectAnim::nextFrame()
|
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)
|
for(std::list<SBattleEffect>::iterator it = owner->battleEffects.begin(); it != owner->battleEffects.end(); ++it)
|
||||||
{
|
{
|
||||||
if(it->effectID == ID)
|
if(it->effectID == ID)
|
||||||
@@ -223,7 +224,6 @@ void CSpellEffectAnim::nextFrame()
|
|||||||
it->x += dx;
|
it->x += dx;
|
||||||
it->y += dy;
|
it->y += dy;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -404,7 +404,8 @@ bool CDefenceAnim::init()
|
|||||||
int lowestMoveID = owner->animIDhelper + 5;
|
int lowestMoveID = owner->animIDhelper + 5;
|
||||||
for(std::list<std::pair<CBattleAnimation *, bool> >::iterator it = owner->pendingAnims.begin(); it != owner->pendingAnims.end(); ++it)
|
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;
|
continue;
|
||||||
|
|
||||||
CBattleAttack * attAnim = dynamic_cast<CBattleAttack *>(it->first);
|
CBattleAttack * attAnim = dynamic_cast<CBattleAttack *>(it->first);
|
||||||
|
Reference in New Issue
Block a user