diff --git a/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp b/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp index c06f3cd8d..afd046bc8 100644 --- a/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp +++ b/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp @@ -28,7 +28,7 @@ namespace AIPathfinding bool allowBypassObjects) { std::vector> rules = { - std::make_shared(cb, ai, nodeStorage, allowBypassObjects), + std::make_shared(cb, ai, nodeStorage), std::make_shared(), std::make_shared(nodeStorage, allowBypassObjects), std::make_shared(), diff --git a/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h b/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h index a1a4c9f0b..134bf8fe2 100644 --- a/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h +++ b/AI/Nullkiller/Pathfinding/Actions/SpecialAction.h @@ -99,6 +99,7 @@ class ISpecialActionFactory { public: virtual std::shared_ptr create(const Nullkiller * ai) = 0; + virtual ~ISpecialActionFactory() = default; }; } diff --git a/AI/Nullkiller/Pathfinding/ObjectGraph.cpp b/AI/Nullkiller/Pathfinding/ObjectGraph.cpp index 5dd0d0f2f..3fabd1645 100644 --- a/AI/Nullkiller/Pathfinding/ObjectGraph.cpp +++ b/AI/Nullkiller/Pathfinding/ObjectGraph.cpp @@ -122,7 +122,7 @@ public: ConnectionCostInfo currentCost = getConnectionsCost(paths); - if(currentCost.connectionsCount <= 1 || currentCost.connectionsCount == 2 && currentCost.totalCost < 3.0f) + if(currentCost.connectionsCount <= 2) return; float neighborCost = getNeighborConnectionsCost(pos, paths); @@ -179,7 +179,6 @@ private: { auto from = path.targetHero->visitablePos(); auto fromObj = actorObjectMap[path.targetHero]; - auto fromTile = cb->getTile(from); auto danger = ai->pathfinder->getStorage()->evaluateDanger(pos, path.targetHero, true); auto updated = target->tryAddConnection( diff --git a/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.cpp b/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.cpp index 18c2468c7..ff0c6321d 100644 --- a/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.cpp +++ b/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.cpp @@ -20,9 +20,8 @@ namespace AIPathfinding AILayerTransitionRule::AILayerTransitionRule( CPlayerSpecificInfoCallback * cb, Nullkiller * ai, - std::shared_ptr nodeStorage, - bool allowEmbark) - :cb(cb), ai(ai), nodeStorage(nodeStorage), allowEmbark(allowEmbark) + std::shared_ptr nodeStorage) + :cb(cb), ai(ai), nodeStorage(nodeStorage) { setup(); } diff --git a/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h b/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h index 128dda493..70c7efaf7 100644 --- a/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h +++ b/AI/Nullkiller/Pathfinding/Rules/AILayerTransitionRule.h @@ -32,14 +32,12 @@ namespace AIPathfinding std::map> summonableVirtualBoats; std::map> waterWalkingActions; std::map> airWalkingActions; - bool allowEmbark; public: AILayerTransitionRule( CPlayerSpecificInfoCallback * cb, Nullkiller * ai, - std::shared_ptr nodeStorage, - bool allowEmbark); + std::shared_ptr nodeStorage); virtual void process( const PathNodeInfo & source,