Browse Source

Fixed #970.
Fixed issue where cursed ground obstacles were appearing on holy ground (and vice versa).
Fixed battle interface blocking itself up after clicking on owned stack to open creature window.

Michał W. Urbańczyk 13 năm trước cách đây
mục cha
commit
77e7a25ed7
2 tập tin đã thay đổi với 9 bổ sung3 xóa
  1. 6 2
      client/BattleInterface/CBattleInterface.cpp
  2. 3 1
      lib/GameConstants.h

+ 6 - 2
client/BattleInterface/CBattleInterface.cpp

@@ -2727,7 +2727,11 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
 		}
 		if(eventType == LCLICK && realizeAction)
 		{
-			myTurn = false; //tends to crash with empty calls
+			//opening creature window shouldn't affect myTurn... 
+			if(currentAction != CREATURE_INFO)
+			{
+				myTurn = false; //tends to crash with empty calls
+			}
 			realizeAction();
 			CCS->curh->changeGraphic(ECursor::COMBAT, ECursor::COMBAT_POINTER);
 			this->console->alterText("");
@@ -3448,7 +3452,7 @@ Point CBattleInterface::whereToBlitObstacleImage(SDL_Surface *image, const CObst
 	int offset = image->h % 42;
 	if(obstacle.obstacleType == CObstacleInstance::USUAL)
 	{
-		if(obstacle.getInfo().blockedTiles.front() < 0)
+		if(obstacle.getInfo().blockedTiles.front() < 0  || offset > 37) //second or part is for holy ground ID=62,65,63
 			offset -= 42;
 	}
 	else if(obstacle.obstacleType == CObstacleInstance::QUICKSAND)

+ 3 - 1
lib/GameConstants.h

@@ -233,8 +233,10 @@ namespace BattlefieldBI
 	{
 		NONE = -1,
 		COASTAL,
-		CURSED_GROUND,
+		//Discrepency from ERM BI description - we have magic plains and cursed gronds swapped
 		MAGIC_PLAINS,
+		CURSED_GROUND,
+		//
 		HOLY_GROUND,
 		EVIL_FOG,
 		CLOVER_FIELD,