diff --git a/lib/rmg/Zone.cpp b/lib/rmg/Zone.cpp index a2043f635..eb7953a0c 100644 --- a/lib/rmg/Zone.cpp +++ b/lib/rmg/Zone.cpp @@ -239,7 +239,6 @@ void Zone::fractalize() //Squared float minDistance = 9 * 9; - //float freeDistance = pos.z ? (10 * 10) : 6 * 6; float freeDistance = pos.z ? (10 * 10) : (9 * 9); float spanFactor = (pos.z ? 0.3f : 0.45f); //Narrower passages in the Underground float marginFactor = 1.0f; diff --git a/lib/rmg/modificators/TreasurePlacer.cpp b/lib/rmg/modificators/TreasurePlacer.cpp index 4d6d09c21..8595308e1 100644 --- a/lib/rmg/modificators/TreasurePlacer.cpp +++ b/lib/rmg/modificators/TreasurePlacer.cpp @@ -875,9 +875,7 @@ void TreasurePlacer::createTreasures(ObjectManager& manager) const int DENSITY_CONSTANT = 400; size_t count = (size * t->density) / DENSITY_CONSTANT; - const int averageValue = (t->min + t->max) / 2; - - const float minDistance = std::max(std::sqrt((float)t->min / 10 / totalDensity), 1.0f); + const float minDistance = std::max(std::sqrt(t->min / 10.0f / totalDensity), 1.0f); size_t emergencyLoopFinish = 0; while(treasures.size() < count && emergencyLoopFinish < count) @@ -961,8 +959,7 @@ void TreasurePlacer::createTreasures(ObjectManager& manager) if (path.valid()) { - /* - //debug purposes +#ifdef TREASURE_PLACER_LOG treasureArea.unite(rmgObject.getArea()); if (guarded) { @@ -971,7 +968,7 @@ void TreasurePlacer::createTreasures(ObjectManager& manager) auto areaToBlock = rmgObject.getAccessibleArea(true) - guardedArea; treasureBlockArea.unite(areaToBlock); } - */ +#endif zone.connectPath(path); manager.placeObject(rmgObject, guarded, true); }