mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Distribute objects among zones in random order
This commit is contained in:
@@ -42,8 +42,6 @@ void ObjectDistributor::init()
|
||||
|
||||
void ObjectDistributor::distributeLimitedObjects()
|
||||
{
|
||||
//FIXME: Must be called after TerrainPainter::process()
|
||||
|
||||
ObjectInfo oi;
|
||||
auto zones = map.getZones();
|
||||
|
||||
@@ -77,6 +75,8 @@ void ObjectDistributor::distributeLimitedObjects()
|
||||
|
||||
auto rmgInfo = handler->getRMGInfo();
|
||||
|
||||
// FIXME: Random order of distribution
|
||||
RandomGeneratorUtil::randomShuffle(matchingZones, zone.getRand());
|
||||
for (auto& zone : matchingZones)
|
||||
{
|
||||
oi.generateObject = [primaryID, secondaryID]() -> CGObjectInstance *
|
||||
|
||||
Reference in New Issue
Block a user