mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed #797. Minor tweaks.
This commit is contained in:
parent
899aeeb748
commit
e9991f7932
@ -1690,13 +1690,11 @@ void CBattleInterface::show(SDL_Surface * to)
|
||||
CSDL_Ext::blit8bppAlphaTo24bpp(cellShade, NULL, to, &temp_rect);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int x = 14 + ((b/BFIELD_WIDTH)%2==0 ? 22 : 0) + 44*(b%BFIELD_WIDTH) + pos.x;
|
||||
int y = 86 + 42 * (b/BFIELD_WIDTH) + pos.y;
|
||||
SDL_Rect temp_rect = genRect(cellShade->h, cellShade->w, x, y);
|
||||
CSDL_Ext::blit8bppAlphaTo24bpp(cellShade, NULL, to, &temp_rect);
|
||||
}
|
||||
//always highlight pointed hex
|
||||
int x = 14 + ((b/BFIELD_WIDTH)%2==0 ? 22 : 0) + 44*(b%BFIELD_WIDTH) + pos.x;
|
||||
int y = 86 + 42 * (b/BFIELD_WIDTH) + pos.y;
|
||||
SDL_Rect temp_rect = genRect(cellShade->h, cellShade->w, x, y);
|
||||
CSDL_Ext::blit8bppAlphaTo24bpp(cellShade, NULL, to, &temp_rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -825,7 +825,7 @@ void BattleInfo::getPotentiallyAttackableHexes(AttackableTiles &at, const CStack
|
||||
break;
|
||||
case WN-1: //16
|
||||
case -WN-1: //-18
|
||||
THex::checkAndPush(destinationTile.hex + pseudoVector + ((hex/WN)%2 ? 0 : -1), hexes);
|
||||
THex::checkAndPush(destinationTile.hex + pseudoVector + ((hex/WN)%2 ? 1 : 0), hexes);
|
||||
break;
|
||||
}
|
||||
BOOST_FOREACH (THex tile, hexes)
|
||||
@ -870,15 +870,15 @@ std::set<THex> BattleInfo::getAttackedHexes(const CStack* attacker, THex destina
|
||||
std::set<THex> attackedHexes;
|
||||
BOOST_FOREACH (THex tile, at.hostileCreaturePositions)
|
||||
{
|
||||
CStack * st = getStackT(tile);
|
||||
CStack * st = getStackT(tile, true);
|
||||
if(st && st->owner != attacker->owner) //only hostile stacks - does it work well with Berserk?
|
||||
{
|
||||
attackedHexes.insert(tile);
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH (THex tile, at.hostileCreaturePositions)
|
||||
BOOST_FOREACH (THex tile, at.friendlyCreaturePositions)
|
||||
{
|
||||
CStack * st = getStackT(tile);
|
||||
CStack * st = getStackT(tile, true);
|
||||
if(st) //friendly stacks can also be damaged by Dragon Breath
|
||||
{
|
||||
attackedHexes.insert(tile);
|
||||
|
Loading…
Reference in New Issue
Block a user