From ff2de1661a6ff6c560bd55c399ec5aad289c1f53 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 20 Jan 2025 21:34:10 +0000 Subject: [PATCH] Enable one-way monoliths for AI --- AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp | 2 ++ config/gameConfig.json | 4 ++-- lib/CGameInfoCallback.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp b/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp index 7bb43fabb..62e2a4e74 100644 --- a/AI/Nullkiller/Pathfinding/AIPathfinderConfig.cpp +++ b/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; diff --git a/config/gameConfig.json b/config/gameConfig.json index 92e869a0b..7959601f9 100644 --- a/config/gameConfig.json +++ b/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 diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp index 1b642c25f..682ec0db8 100644 --- a/lib/CGameInfoCallback.cpp +++ b/lib/CGameInfoCallback.cpp @@ -473,7 +473,7 @@ std::vector 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); }