Ver código fonte

Fix stack amount boxes flickering between actions

Ivan Savenko 2 anos atrás
pai
commit
1fcaeba8e0
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      client/battle/BattleStacksController.cpp

+ 6 - 1
client/battle/BattleStacksController.cpp

@@ -380,7 +380,7 @@ void BattleStacksController::updateBattleAnimations()
 
 	if (hadAnimations && currentAnimations.empty())
 	{
-		stackAmountBoxHidden.clear();
+		//stackAmountBoxHidden.clear();
 		owner.executeStagedAnimations();
 		if (currentAnimations.empty())
 			owner.onAnimationsFinished();
@@ -391,6 +391,9 @@ void BattleStacksController::updateBattleAnimations()
 
 void BattleStacksController::addNewAnim(BattleAnimation *anim)
 {
+	if (currentAnimations.empty())
+		stackAmountBoxHidden.clear();
+
 	owner.onAnimationsStarted();
 	currentAnimations.push_back(anim);
 
@@ -685,6 +688,8 @@ void BattleStacksController::endAction(const BattleAction* action)
 	owner.executeStagedAnimations();
 	owner.waitForAnimations();
 
+	stackAmountBoxHidden.clear();
+
 	owner.windowObject->blockUI(activeStack == nullptr);
 	removeExpiredColorFilters();
 }