1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Use product instead of distance sum for Subterranean Gate placement.

This commit is contained in:
Tomasz Zieliński 2023-04-12 09:31:09 +02:00
parent e6eafca2d0
commit 74d028d951

View File

@ -243,7 +243,7 @@ void ConnectionsPlacer::selfSideIndirectConnection(const rmg::ZoneConnection & c
path2 = managerOther.placeAndConnectObject(toPlace, rmgGate2, minDist, guarded2, true, ObjectManager::OptimizeType::NONE); path2 = managerOther.placeAndConnectObject(toPlace, rmgGate2, minDist, guarded2, true, ObjectManager::OptimizeType::NONE);
return path2.valid() ? (dist + otherDist) : -1.f; return path2.valid() ? (dist * otherDist) : -1.f;
}, guarded1, true, ObjectManager::OptimizeType::DISTANCE); }, guarded1, true, ObjectManager::OptimizeType::DISTANCE);
if(path1.valid() && path2.valid()) if(path1.valid() && path2.valid())