mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +02:00
Fixed overlaping of treasure piles.
This commit is contained in:
parent
b68f16e89e
commit
dd5c94fa1e
@ -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
|
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)
|
for (auto tile : boundary)
|
||||||
{
|
{
|
||||||
|
if (gen->shouldBeBlocked(tile)) //this tile could be already blocked, don't place a monster here
|
||||||
|
continue;
|
||||||
bool possible = false;
|
bool possible = false;
|
||||||
gen->foreach_neighbour(tile, [gen, &accessibleTiles, &possible, boundary](int3 pos)
|
gen->foreach_neighbour(tile, [gen, &accessibleTiles, &possible, boundary](int3 pos)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user