1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Missed optimization case

This commit is contained in:
Tomasz Zieliński 2023-12-21 17:56:21 +01:00
parent d6336d7c45
commit f9e5d73014

View File

@ -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)
{