1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00
This commit is contained in:
Michał W. Urbańczyk
2011-04-24 02:02:41 +00:00
parent 1973241c1e
commit 362f413b4d
2 changed files with 6 additions and 4 deletions

View File

@@ -1045,6 +1045,7 @@ bool CPlayerInterface::moveHero( const CGHeroInstance *h, CGPath path )
if (!h)
return false; //can't find hero
eventsM.unlock();
pim->unlock();
bool result = false;
@@ -1091,10 +1092,8 @@ bool CPlayerInterface::moveHero( const CGHeroInstance *h, CGPath path )
cb->moveHero(h,endpos);
eventsM.unlock();
while(stillMoveHero.data != STOP_MOVE && stillMoveHero.data != CONTINUE_MOVE)
stillMoveHero.cond.wait(un);
eventsM.lock();
if (guarded) // Abort movement if a guard was fought.
break;
@@ -1105,6 +1104,7 @@ bool CPlayerInterface::moveHero( const CGHeroInstance *h, CGPath path )
}
pim->lock();
eventsM.lock();
return result;
}