浏览代码

Enable one-way monoliths for AI

Ivan Savenko 9 月之前
父节点
当前提交
ff2de1661a
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 2 0
      AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp
  2. 2 2
      config/gameConfig.json
  3. 1 1
      lib/CGameInfoCallback.cpp

+ 2 - 0
AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp

@@ -50,6 +50,8 @@ namespace AIPathfinding
 		options.allowLayerTransitioningAfterBattle = true;
 		options.useTeleportWhirlpool = true;
 		options.forceUseTeleportWhirlpool = true;
+		options.useTeleportOneWay = true;
+		options.useTeleportOneWayRandom = true;
 	}
 
 	AIPathfinderConfig::~AIPathfinderConfig() = default;

+ 2 - 2
config/gameConfig.json

@@ -484,9 +484,9 @@
 			// if enabled, pathfinder will take use of any bidirectional monoliths 
 			"useMonolithTwoWay" : true,
 			// if enabled, pathfinder will take use of one-way monolith that only have one known exit
-			"useMonolithOneWayUnique" : false,
+			"useMonolithOneWayUnique" : true,
 			// if enabled, pathfinder will take use of one-way monoliths with multiple exits.
-			"useMonolithOneWayRandom" : false,
+			"useMonolithOneWayRandom" : true,
 			// if enabled and hero has whirlpool protection effect, pathfinder will take use of whirpools
 			"useWhirlpool" : true,
 			// if enabled flying will work like in original game, otherwise nerf similar to HotA flying is applied

+ 1 - 1
lib/CGameInfoCallback.cpp

@@ -473,7 +473,7 @@ std::vector <const CGObjectInstance *> CGameInfoCallback::getVisitableObjs(int3
 
 	for(const CGObjectInstance * obj : t->visitableObjects)
 	{
-		if(getPlayerID() || obj->ID != Obj::EVENT) //hide events from players
+		if(!getPlayerID().has_value() || obj->ID != Obj::EVENT) //hide events from players
 			ret.push_back(obj);
 	}