浏览代码

Fix toggling of auto combat

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

+ 2 - 1
client/CPlayerInterface.cpp

@@ -1904,8 +1904,9 @@ bool CPlayerInterface::capturedAllEvents()
 	}
 
 	bool needToLockAdventureMap = adventureInt && adventureInt->isActive() && CGI->mh->hasOngoingAnimations();
+	bool quickCombatOngoing = isAutoFightOn && !battleInt;
 
-	if (ignoreEvents || needToLockAdventureMap || isAutoFightOn)
+	if (ignoreEvents || needToLockAdventureMap || quickCombatOngoing )
 	{
 		GH.input().ignoreEventsUntilInput();
 		return true;

+ 0 - 2
client/battle/BattleSiegeController.cpp

@@ -330,8 +330,6 @@ bool BattleSiegeController::isAttackableByCatapult(BattleHex hex) const
 
 void BattleSiegeController::stackIsCatapulting(const CatapultAttack & ca)
 {
-	owner.checkForAnimations();
-
 	if (ca.attacker != -1)
 	{
 		const CStack *stack = owner.curInt->cb->battleGetStackByID(ca.attacker);

+ 0 - 5
client/battle/BattleStacksController.cpp

@@ -154,11 +154,6 @@ void BattleStacksController::collectRenderableObjects(BattleRenderer & renderer)
 
 void BattleStacksController::stackReset(const CStack * stack)
 {
-	owner.checkForAnimations();
-
-	//reset orientation?
-	//stackFacingRight[stack->unitId()] = stack->unitSide() == BattleSide::ATTACKER;
-
 	auto iter = stackAnimation.find(stack->unitId());
 
 	if(iter == stackAnimation.end())