Преглед изворни кода

Fix visibility of stack amount box on start of combat

Ivan Savenko пре 2 година
родитељ
комит
86616a5a3b
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      client/battle/CBattleStacksController.cpp

+ 5 - 2
client/battle/CBattleStacksController.cpp

@@ -260,10 +260,13 @@ bool CBattleStacksController::stackNeedsAmountBox(const CStack * stack)
 			currentActionTarget = target.at(0).hexValue;
 	}
 
-	if(!stack->alive())
+	if(stack->hasBonusOfType(Bonus::SIEGE_WEAPON) && stack->getCount() == 1) //do not show box for singular war machines, stacked war machines with box shown are supported as extension feature
 		return false;
 
-	if(stack->hasBonusOfType(Bonus::SIEGE_WEAPON) && stack->getCount() == 1) //do not show box for singular war machines, stacked war machines with box shown are supported as extension feature
+	if (!owner->battleActionsStarted) // do not perform any further checks since they are related to actions that will only occur after intro music
+		return true;
+
+	if(!stack->alive())
 		return false;
 
 	if(stack->getCount() == 0) //hide box when target is going to die anyway - do not display "0 creatures"