mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-10 23:48:04 +02:00
More random paths within zones.
This commit is contained in:
parent
01491f9f1e
commit
f7882135e6
@ -429,7 +429,11 @@ void CRmgTemplateZone::fractalize(CMapGenerator* gen)
|
|||||||
|
|
||||||
while (possibleTiles.size())
|
while (possibleTiles.size())
|
||||||
{
|
{
|
||||||
for (auto tileToMakePath : possibleTiles)
|
//link tiles in random order
|
||||||
|
std::vector<int3> tilesToMakePath(possibleTiles.begin(), possibleTiles.end());
|
||||||
|
RandomGeneratorUtil::randomShuffle(tilesToMakePath, gen->rand);
|
||||||
|
|
||||||
|
for (auto tileToMakePath : tilesToMakePath)
|
||||||
{
|
{
|
||||||
//find closest free tile
|
//find closest free tile
|
||||||
float currentDistance = 1e10;
|
float currentDistance = 1e10;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user