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:
parent
c3584f7f91
commit
e6d8b65e2c
@ -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;
|
||||||
|
@ -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);
|
||||||
|
@ -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())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user