1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-10 00:43:59 +02:00

Merge pull request #1023 from kambala-decapitator/unlock-advmap-after-battle-result

unlock adventure map UI after closing battle result dialog
This commit is contained in:
Andrii Danylchenko 2022-10-01 09:17:03 +03:00 committed by GitHub
commit 5b72284aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -930,7 +930,6 @@ void CPlayerInterface::battleEnd(const BattleResult *br)
isAutoFightOn = false; isAutoFightOn = false;
cb->unregisterBattleInterface(autofightingAI); cb->unregisterBattleInterface(autofightingAI);
autofightingAI.reset(); autofightingAI.reset();
adventureInt->quickCombatUnlock();
if (!battleInt) if (!battleInt)
{ {
@ -938,6 +937,7 @@ void CPlayerInterface::battleEnd(const BattleResult *br)
// #1490 - during AI turn when quick combat is on, we need to display the message and wait for user to close it. // #1490 - during AI turn when quick combat is on, we need to display the message and wait for user to close it.
// Otherwise NewTurn causes freeze. // Otherwise NewTurn causes freeze.
waitWhileDialog(); waitWhileDialog();
adventureInt->quickCombatUnlock();
return; return;
} }
} }
@ -945,6 +945,7 @@ void CPlayerInterface::battleEnd(const BattleResult *br)
BATTLE_EVENT_POSSIBLE_RETURN; BATTLE_EVENT_POSSIBLE_RETURN;
battleInt->battleFinished(*br); battleInt->battleFinished(*br);
adventureInt->quickCombatUnlock();
} }
void CPlayerInterface::battleLogMessage(const std::vector<MetaString> & lines) void CPlayerInterface::battleLogMessage(const std::vector<MetaString> & lines)

View File

@ -1884,7 +1884,7 @@ void CBattleInterface::blockUI(bool on)
bSurrender->block(on || curInt->cb->battleGetSurrenderCost() < 0); bSurrender->block(on || curInt->cb->battleGetSurrenderCost() < 0);
// block only if during enemy turn and auto-fight is off // block only if during enemy turn and auto-fight is off
// othervice - crash on accessing non-exisiting active stack // otherwise - crash on accessing non-exisiting active stack
bAutofight->block(!curInt->isAutoFightOn && !activeStack); bAutofight->block(!curInt->isAutoFightOn && !activeStack);
if (tacticsMode && btactEnd && btactNext) if (tacticsMode && btactEnd && btactNext)