1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
This commit is contained in:
Michał W. Urbańczyk 2011-08-25 15:49:11 +00:00
parent 3152e6d540
commit 77be397bf6

View File

@ -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