Browse Source

fix: simplify NK2AI_TRACE_LEVEL 2 to avoid crash on some maps

Mircea TheHonestCTO 3 months ago
parent
commit
0fc166b404
1 changed files with 3 additions and 1 deletions
  1. 3 1
      AI/Nullkiller2/Behaviors/CaptureObjectsBehavior.cpp

+ 3 - 1
AI/Nullkiller2/Behaviors/CaptureObjectsBehavior.cpp

@@ -98,7 +98,9 @@ Goals::TGoalVec CaptureObjectsBehavior::getVisitGoals(
 			auto subGoal = firstBlockedAction->decompose(nullkiller, path.targetHero);
 			auto subGoal = firstBlockedAction->decompose(nullkiller, path.targetHero);
 
 
 #if NK2AI_TRACE_LEVEL >= 2
 #if NK2AI_TRACE_LEVEL >= 2
-			logAi->trace("Decomposing special action %s returns %s", firstBlockedAction->toString(), subGoal->toString());
+			// Deactivating because sometimes it ends up with cb null in QuestInfo::getObject(IGameInfoCallback *cb)
+			// logAi->trace("Decomposing special action %s returns %s", firstBlockedAction->toString(), subGoal->toString());
+			logAi->trace("Decomposing special action %s", firstBlockedAction->toString());
 #endif
 #endif
 
 
 			if(!subGoal->invalid())
 			if(!subGoal->invalid())