1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

Enable one-way monoliths for AI

This commit is contained in:
Ivan Savenko 2025-01-20 21:34:10 +00:00
parent e26fe815e9
commit ff2de1661a
3 changed files with 5 additions and 3 deletions

View File

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

View File

@ -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

View File

@ -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);
}