2
0
Michał W. Urbańczyk 14 жил өмнө
parent
commit
77be397bf6

+ 1 - 1
server/CGameHandler.cpp

@@ -5083,9 +5083,9 @@ void CGameHandler::runBattle()
 					sas.stack = next->ID;
 					sendAndApply(&sas);
 					boost::unique_lock<boost::mutex> lock(battleMadeAction.mx);
+					battleMadeAction.data = false;
 					while(next->alive() && (!battleMadeAction.data  &&  !battleResult.get())) //active stack hasn't made its action and battle is still going
 						battleMadeAction.cond.wait(lock);
-					battleMadeAction.data = false;
 				}
 
 				if(battleResult.get()) //don't touch it, battle could be finished while waiting got action