Explorar el Código

Randomly shuffle required objects to avoid patterns

nordsoft hace 3 años
padre
commit
670bca2fdb
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;