Selaa lähdekoodia

Update PriorityEvaluator.cpp

Further working towards heroes avoiding danger.
Xilmi 1 vuosi sitten
vanhempi
sitoutus
ec5da0e6b3
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

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

@@ -1466,6 +1466,11 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
 							score /= turnsTo;
 					}
 				}
+				else
+				{
+					if (evaluationContext.enemyHeroDangerRatio > 0.5 && !evaluationContext.isDefend)
+						return 0;
+				}
 				break;
 			}
 		}