mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
* Fixed: The Creatures inside the walls in the 1st row of hexes should have priority over the wall
This commit is contained in:
parent
f3b5ede486
commit
7c771e5c56
@ -3265,13 +3265,18 @@ void CBattleInterface::showPieceOfWall(SDL_Surface * to, int hex, const std::vec
|
|||||||
if(!siegeH)
|
if(!siegeH)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
static const std::map<int, int> hexToPart = boost::assign::map_list_of(12, 8)(16, 1)(29, 7)(50, 2)(62, 12)(78, 6)(112, 10)(147, 5)(165, 11)(182, 3)(186, 0);
|
static const std::map<int, int> hexToPart = boost::assign::map_list_of(12, 8)(29, 7)(50, 2)(62, 12)(78, 6)(112, 10)(147, 5)(165, 11)(182, 3)(186, 0);
|
||||||
|
|
||||||
//additionally print bottom wall
|
//additionally print bottom wall
|
||||||
if(hex == 182)
|
if(hex == 182)
|
||||||
{
|
{
|
||||||
siegeH->printPartOfWall(to, 4);
|
siegeH->printPartOfWall(to, 4);
|
||||||
}
|
}
|
||||||
|
// additionally print background wall, wall has lower priority than creatures in the most upper hexes
|
||||||
|
if (hex == 12)
|
||||||
|
{
|
||||||
|
siegeH->printPartOfWall(to, 1);
|
||||||
|
}
|
||||||
|
|
||||||
std::map<int, int>::const_iterator it = hexToPart.find(hex);
|
std::map<int, int>::const_iterator it = hexToPart.find(hex);
|
||||||
if(it != hexToPart.end())
|
if(it != hexToPart.end())
|
||||||
|
Loading…
Reference in New Issue
Block a user