浏览代码

Fix assertion failure on teleport cast

Ivan Savenko 2 年之前
父节点
当前提交
3213800097
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      client/battle/BattleInterface.cpp
  2. 1 1
      client/battle/BattleStacksController.cpp

+ 2 - 0
client/battle/BattleInterface.cpp

@@ -445,6 +445,8 @@ void BattleInterface::spellCast(const BattleSpellCast * sc)
 			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)

+ 1 - 1
client/battle/BattleStacksController.cpp

@@ -499,7 +499,7 @@ void BattleStacksController::stacksAreAttacked(std::vector<StackAttackedInfo> at
 void BattleStacksController::stackTeleported(const CStack *stack, std::vector<BattleHex> destHex, int distance)
 {
 	assert(destHex.size() > 0);
-	owner.checkForAnimations();
+	//owner.checkForAnimations(); // NOTE: at this point spellcast animations were added, but not executed
 
 	owner.addToAnimationStage(EAnimationEvents::HIT, [=](){
 		addNewAnim( new ColorTransformAnimation(owner, stack, "teleportFadeOut", nullptr) );