Michał W. Urbańczyk 14 éve
szülő
commit
362f413b4d
2 módosított fájl, 6 hozzáadás és 4 törlés
  1. 4 2
      client/CBattleInterface.cpp
  2. 2 2
      client/CPlayerInterface.cpp

+ 4 - 2
client/CBattleInterface.cpp

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

+ 2 - 2
client/CPlayerInterface.cpp

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