1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-23 21:29:13 +02:00

Fix toggling of auto combat

This commit is contained in:
Ivan Savenko 2023-07-19 15:15:23 +03:00
parent c3584f7f91
commit e6d8b65e2c
3 changed files with 2 additions and 8 deletions

View File

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

View File

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

View File

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