mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Place Monoliths at max distance in Junction zone
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "TileInfo.h"
|
||||
#include "CMapGenerator.h"
|
||||
#include "RmgPath.h"
|
||||
#include "modificators/ObjectManager.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
@@ -307,6 +308,16 @@ void Zone::fractalize()
|
||||
tilesToIgnore.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Handle special case - place Monoliths at the edge of a zone
|
||||
auto objectManager = getModificator<ObjectManager>();
|
||||
if (objectManager)
|
||||
{
|
||||
objectManager->createMonoliths();
|
||||
}
|
||||
}
|
||||
|
||||
Lock lock(areaMutex);
|
||||
//cut straight paths towards the center. A* is too slow for that.
|
||||
auto areas = connectedAreas(clearedTiles, false);
|
||||
|
||||
Reference in New Issue
Block a user