1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-18 03:21:27 +02:00

Update Nullkiller.cpp

prioOfTask-variable-usage bound to trace-level as otherwise a warning will ensue.
This commit is contained in:
Xilmi 2024-09-06 17:20:12 +02:00
parent d4ee899565
commit 35d8705fea

View File

@ -410,10 +410,14 @@ void Nullkiller::makeTurn()
decompose(bestTasks, sptr(ExplorationBehavior()), MAX_DEPTH);
TTaskVec selectedTasks;
#if NKAI_TRACE_LEVEL >= 1
int prioOfTask = 0;
#endif
for (int prio = PriorityEvaluator::PriorityTier::INSTAKILL; prio <= PriorityEvaluator::PriorityTier::DEFEND; ++prio)
{
#if NKAI_TRACE_LEVEL >= 1
prioOfTask = prio;
#endif
selectedTasks = buildPlan(bestTasks, prio);
if (!selectedTasks.empty() || settings->isUseFuzzy())
break;