mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-09 01:06:07 +02:00
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.
This commit is contained in:
@ -2726,8 +2726,12 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
|
|||||||
this->console->whoSetAlter = 0;
|
this->console->whoSetAlter = 0;
|
||||||
}
|
}
|
||||||
if(eventType == LCLICK && realizeAction)
|
if(eventType == LCLICK && realizeAction)
|
||||||
|
{
|
||||||
|
//opening creature window shouldn't affect myTurn...
|
||||||
|
if(currentAction != CREATURE_INFO)
|
||||||
{
|
{
|
||||||
myTurn = false; //tends to crash with empty calls
|
myTurn = false; //tends to crash with empty calls
|
||||||
|
}
|
||||||
realizeAction();
|
realizeAction();
|
||||||
CCS->curh->changeGraphic(ECursor::COMBAT, ECursor::COMBAT_POINTER);
|
CCS->curh->changeGraphic(ECursor::COMBAT, ECursor::COMBAT_POINTER);
|
||||||
this->console->alterText("");
|
this->console->alterText("");
|
||||||
@ -3448,7 +3452,7 @@ Point CBattleInterface::whereToBlitObstacleImage(SDL_Surface *image, const CObst
|
|||||||
int offset = image->h % 42;
|
int offset = image->h % 42;
|
||||||
if(obstacle.obstacleType == CObstacleInstance::USUAL)
|
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;
|
offset -= 42;
|
||||||
}
|
}
|
||||||
else if(obstacle.obstacleType == CObstacleInstance::QUICKSAND)
|
else if(obstacle.obstacleType == CObstacleInstance::QUICKSAND)
|
||||||
|
@ -233,8 +233,10 @@ namespace BattlefieldBI
|
|||||||
{
|
{
|
||||||
NONE = -1,
|
NONE = -1,
|
||||||
COASTAL,
|
COASTAL,
|
||||||
CURSED_GROUND,
|
//Discrepency from ERM BI description - we have magic plains and cursed gronds swapped
|
||||||
MAGIC_PLAINS,
|
MAGIC_PLAINS,
|
||||||
|
CURSED_GROUND,
|
||||||
|
//
|
||||||
HOLY_GROUND,
|
HOLY_GROUND,
|
||||||
EVIL_FOG,
|
EVIL_FOG,
|
||||||
CLOVER_FIELD,
|
CLOVER_FIELD,
|
||||||
|
Reference in New Issue
Block a user