From 848454d48aa01e7c316d3687be24ac4311b49084 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 2 Dec 2022 21:38:59 +0200 Subject: [PATCH] Check for end-of-battle after opening spells are cast, fixes potentially infinite battle --- server/CGameHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 473ad5ae6..40e684973 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -6642,6 +6642,8 @@ void CGameHandler::runBattle() } } } + // it is possible that due to opening spells one side was eliminated -> check for end of battle + checkBattleStateChanges(); bool firstRound = true;//FIXME: why first round is -1?