Sfoglia il codice sorgente

fix: simplify NK2AI_TRACE_LEVEL 2 to avoid crash on some maps

Mircea TheHonestCTO 3 mesi fa
parent
commit
0fc166b404
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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);
 
 #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
 
 			if(!subGoal->invalid())