mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Fix assertion failure on teleport cast
This commit is contained in:
parent
3f04db5163
commit
3213800097
@ -445,6 +445,8 @@ void BattleInterface::spellCast(const BattleSpellCast * sc)
|
|||||||
stacksController->addNewAnim(new EffectAnimation(*this, side ? "SP07_B.DEF" : "SP07_A.DEF", rightHero));
|
stacksController->addNewAnim(new EffectAnimation(*this, side ? "SP07_B.DEF" : "SP07_A.DEF", rightHero));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// animations will be executed by spell effects
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleInterface::battleStacksEffectsSet(const SetStackEffect & sse)
|
void BattleInterface::battleStacksEffectsSet(const SetStackEffect & sse)
|
||||||
|
@ -499,7 +499,7 @@ void BattleStacksController::stacksAreAttacked(std::vector<StackAttackedInfo> at
|
|||||||
void BattleStacksController::stackTeleported(const CStack *stack, std::vector<BattleHex> destHex, int distance)
|
void BattleStacksController::stackTeleported(const CStack *stack, std::vector<BattleHex> destHex, int distance)
|
||||||
{
|
{
|
||||||
assert(destHex.size() > 0);
|
assert(destHex.size() > 0);
|
||||||
owner.checkForAnimations();
|
//owner.checkForAnimations(); // NOTE: at this point spellcast animations were added, but not executed
|
||||||
|
|
||||||
owner.addToAnimationStage(EAnimationEvents::HIT, [=](){
|
owner.addToAnimationStage(EAnimationEvents::HIT, [=](){
|
||||||
addNewAnim( new ColorTransformAnimation(owner, stack, "teleportFadeOut", nullptr) );
|
addNewAnim( new ColorTransformAnimation(owner, stack, "teleportFadeOut", nullptr) );
|
||||||
|
Loading…
Reference in New Issue
Block a user