Răsfoiți Sursa

Fix stack amount boxes flickering between actions

Ivan Savenko 2 ani în urmă
părinte
comite
1fcaeba8e0
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  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();
 }