From 79be1c66fb1c71b19336fcefb2cb000f3e20f6c7 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Tue, 18 Jul 2023 20:06:39 +0300 Subject: [PATCH] Fix quick combat regression --- client/CPlayerInterface.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 31d64462e..f8e49b1bb 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -640,7 +640,7 @@ void CPlayerInterface::battleStart(const CCreatureSet *army1, const CCreatureSet //quick combat with neutral creatures only auto * army2_object = dynamic_cast(army2); if((!autoBattleResultRefused && !allowBattleReplay && army2_object - && army2_object->getOwner() == PlayerColor::UNFLAGGABLE + && (army2_object->getOwner() == PlayerColor::UNFLAGGABLE || army2_object->getOwner() == PlayerColor::NEUTRAL) && settings["adventure"]["quickCombat"].Bool()) || settings["adventure"]["alwaysSkipCombat"].Bool()) { @@ -785,7 +785,10 @@ void CPlayerInterface::activeStack(const CStack * stack) //called when it's turn if (autofightingAI) { if (isAutoFightOn) + { autofightingAI->activeStack(stack); + return; + } cb->unregisterBattleInterface(autofightingAI); autofightingAI.reset();