mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Fixed #782.
This commit is contained in:
parent
3152e6d540
commit
77be397bf6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user