Просмотр исходного кода

Update PriorityEvaluator.cpp

Workaround for weird -nan(ind) closestWayRatios.
Xilmi 1 год назад
Родитель
Сommit
1176628a88
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

+ 3 - 0
AI/Nullkiller/Engine/PriorityEvaluator.cpp

@@ -1547,6 +1547,9 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
 			}
 		}
 		result = score;
+		//TODO: Figure out the root cause for why evaluationContext.closestWayRatio has become -nan(ind).
+		if (std::isnan(result))
+			return 0;
 	}
 
 #if NKAI_TRACE_LEVEL >= 2