Browse Source

Important fix for ClearWayTo in new branch.

DJWarmonger 7 years ago
parent
commit
a44c792b7c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      AI/VCAI/FuzzyHelper.cpp

+ 2 - 2
AI/VCAI/FuzzyHelper.cpp

@@ -90,8 +90,8 @@ float FuzzyHelper::evaluate(Goals::GatherArmy & g)
 
 float FuzzyHelper::evaluate(Goals::ClearWayTo & g)
 {
-	if(!g.hero.h)
-		throw cannotFulfillGoalException("ClearWayTo called without hero!");
+	if (!g.hero.h)
+		return 0; //lowest priority
 
 	int3 t = ai->getCachedSectorMap(g.hero)->firstTileToGet(g.hero, g.tile);