1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-27 21:49:10 +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

@ -1113,9 +1113,11 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
//create stack queue
bool embedQueue = screen->h < 700;
queue = new CStackQueue(embedQueue, this);
if(!embedQueue && curInt->sysOpts.showQueue)
if(!embedQueue)
{
pos.y += queue->pos.h / 2; //center whole window
if(curInt->sysOpts.showQueue)
pos.y += queue->pos.h / 2; //center whole window
queue->moveTo(Point(pos.x, pos.y - queue->pos.h));
// queue->pos.x = pos.x;
// queue->pos.y = pos.y - queue->pos.h;

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;
}