1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed overlaping of treasure piles.

This commit is contained in:
DjWarmonger 2014-06-07 10:47:38 +02:00
parent b68f16e89e
commit dd5c94fa1e

View File

@ -547,6 +547,8 @@ bool CRmgTemplateZone::createTreasurePile (CMapGenerator* gen, int3 &pos)
std::vector<int3> accessibleTiles; //we can't place guard in dead-end of zone, make sure that at least one neightbouring tile is possible and not blocked
for (auto tile : boundary)
{
if (gen->shouldBeBlocked(tile)) //this tile could be already blocked, don't place a monster here
continue;
bool possible = false;
gen->foreach_neighbour(tile, [gen, &accessibleTiles, &possible, boundary](int3 pos)
{