Selaa lähdekoodia

Missed optimization case

Tomasz Zieliński 1 vuosi sitten
vanhempi
sitoutus
f9e5d73014
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/rmg/modificators/ObjectManager.cpp

+ 1 - 1
lib/rmg/modificators/ObjectManager.cpp

@@ -314,7 +314,7 @@ rmg::Path ObjectManager::placeAndConnectObject(const rmg::Area & searchArea, rmg
 			return rmg::Path::invalid();
 		}
 		possibleArea.erase(pos); //do not place again at this point
-		auto accessibleArea = obj.getAccessibleArea(isGuarded) * (zone.areaPossible() + zone.freePaths());
+		auto accessibleArea = obj.getAccessibleArea(isGuarded) * cachedArea;
 		//we should exclude tiles which will be covered
 		if(isGuarded)
 		{