1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fixed (unnecessary?) deadlock in BattleStacksRemoved. Daemon summoning is pretty functional.

This commit is contained in:
DjWarmonger
2011-10-02 13:59:12 +00:00
parent 07b8f87fb7
commit f1f416c890
5 changed files with 46 additions and 1 deletions

View File

@@ -640,6 +640,7 @@ void CPlayerInterface::battleNewStackAppeared(const CStack * stack)
//changing necessary things in battle interface
battleInt->newStack(stack);
//battleInt->addNewAnim(new CDummyAnim(battleInt, 2)); //wait a moment
}
void CPlayerInterface::battleObstaclesRemoved(const std::set<si32> & removedObstacles)
@@ -682,7 +683,7 @@ void CPlayerInterface::battleStacksRemoved(const BattleStacksRemoved & bsr)
return;
}
boost::unique_lock<boost::recursive_mutex> un(*pim);
//boost::unique_lock<boost::recursive_mutex> un(*pim); //fixme: this one caused deadlock
for(std::set<ui32>::const_iterator it = bsr.stackIDs.begin(); it != bsr.stackIDs.end(); ++it) //for each removed stack
{
battleInt->stackRemoved(*it);