1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

AINodeStorage.h NKAI #define to NK2AI

This commit is contained in:
Mircea TheHonestCTO
2025-08-24 22:35:27 +02:00
parent 54b3d17bcf
commit d113bc28d9
4 changed files with 9 additions and 9 deletions

View File

@@ -173,7 +173,7 @@ void AIPathfinder::updateGraphs(
} }
}); });
if(NKAI_GRAPH_TRACE_LEVEL >= 1) if(NK2AI_GRAPH_TRACE_LEVEL >= 1)
{ {
for(auto hero : heroes) for(auto hero : heroes)
{ {

View File

@@ -153,7 +153,7 @@ void GraphPaths::dumpToLog() const
if(!node.previous.valid()) if(!node.previous.valid())
continue; continue;
if(NKAI_GRAPH_TRACE_LEVEL >= 2) if(NK2AI_GRAPH_TRACE_LEVEL >= 2)
{ {
logAi->trace( logAi->trace(
"%s -> %s: %f !%d", "%s -> %s: %f !%d",

View File

@@ -53,7 +53,7 @@ void ObjectGraph::updateGraph(const Nullkiller * aiNk)
calculator.addMinimalDistanceJunctions(); calculator.addMinimalDistanceJunctions();
calculator.calculateConnections(); calculator.calculateConnections();
if(NKAI_GRAPH_TRACE_LEVEL >= 1) if(NK2AI_GRAPH_TRACE_LEVEL >= 1)
dumpToLog("graph"); dumpToLog("graph");
} }
@@ -134,7 +134,7 @@ void ObjectGraph::dumpToLog(std::string visualKey) const
{ {
for(auto & node : tile.second.connections) for(auto & node : tile.second.connections)
{ {
if(NKAI_GRAPH_TRACE_LEVEL >= 2) if(NK2AI_GRAPH_TRACE_LEVEL >= 2)
{ {
logAi->trace( logAi->trace(
"%s -> %s: %f !%d", "%s -> %s: %f !%d",

View File

@@ -59,7 +59,7 @@ float ObjectGraphCalculator::getNeighborConnectionsCost(const int3 & pos, std::v
{ {
float neighborCost = std::numeric_limits<float>::max(); float neighborCost = std::numeric_limits<float>::max();
if(NKAI_GRAPH_TRACE_LEVEL >= 2) if(NK2AI_GRAPH_TRACE_LEVEL >= 2)
{ {
logAi->trace("Checking junction %s", pos.toString()); logAi->trace("Checking junction %s", pos.toString());
} }
@@ -77,7 +77,7 @@ float ObjectGraphCalculator::getNeighborConnectionsCost(const int3 & pos, std::v
{ {
neighborCost = costTotal.avg; neighborCost = costTotal.avg;
if(NKAI_GRAPH_TRACE_LEVEL >= 2) if(NK2AI_GRAPH_TRACE_LEVEL >= 2)
{ {
logAi->trace("Better node found at %s", neighbor.toString()); logAi->trace("Better node found at %s", neighbor.toString());
} }
@@ -170,7 +170,7 @@ void ObjectGraphCalculator::calculateConnections(const int3 & pos, std::vector<A
path.movementCost(), path.movementCost(),
danger); danger);
if(NKAI_GRAPH_TRACE_LEVEL >= 2 && updated) if(NK2AI_GRAPH_TRACE_LEVEL >= 2 && updated)
{ {
logAi->trace( logAi->trace(
"Connected %s[%s] -> %s[%s] through [%s], cost %2f", "Connected %s[%s] -> %s[%s] through [%s], cost %2f",
@@ -227,7 +227,7 @@ void ObjectGraphCalculator::calculateConnections(const int3 & pos, std::vector<A
path1.movementCost() + path2.movementCost(), path1.movementCost() + path2.movementCost(),
danger); danger);
if(NKAI_GRAPH_TRACE_LEVEL >= 2 && updated) if(NK2AI_GRAPH_TRACE_LEVEL >= 2 && updated)
{ {
logAi->trace( logAi->trace(
"Connected %s[%s] -> %s[%s] through [%s], cost %2f", "Connected %s[%s] -> %s[%s] through [%s], cost %2f",
@@ -276,7 +276,7 @@ void ObjectGraphCalculator::removeExtraConnections()
{ {
target->removeConnection(c.first, c.second); target->removeConnection(c.first, c.second);
if(NKAI_GRAPH_TRACE_LEVEL >= 2) if(NK2AI_GRAPH_TRACE_LEVEL >= 2)
{ {
logAi->trace("Remove ineffective connection %s->%s", c.first.toString(), c.second.toString()); logAi->trace("Remove ineffective connection %s->%s", c.first.toString(), c.second.toString());
} }