Преглед изворни кода

Randomly shuffle required objects to avoid patterns

nordsoft пре 3 година
родитељ
комит
670bca2fdb
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      lib/rmg/ObjectManager.cpp

+ 2 - 1
lib/rmg/ObjectManager.cpp

@@ -27,7 +27,7 @@
 void ObjectManager::process()
 {
 	zone.fractalize();
-		createRequiredObjects();
+	createRequiredObjects();
 }
 
 void ObjectManager::init()
@@ -220,6 +220,7 @@ bool ObjectManager::createRequiredObjects()
 {
 	logGlobal->trace("Creating required objects");
 	
+	RandomGeneratorUtil::randomShuffle(requiredObjects, generator.rand);	
 	for(const auto & object : requiredObjects)
 	{
 		auto * obj = object.first;