(c5e44ed94) Take access into account before accepting a path. Fixes bots trying to reach places where they have no access to (#1351).
This commit is contained in:
@@ -204,6 +204,7 @@ namespace Barotrauma
|
||||
unreachable.Add(hull);
|
||||
continue;
|
||||
}
|
||||
if (!PathSteering.HasAccessToPath(path)) { continue; }
|
||||
int unsafeNodes = path.Nodes.Count(n => n.CurrentHull != character.CurrentHull && HumanAIController.UnsafeHulls.Contains(n.CurrentHull));
|
||||
hullSafety /= 1 + unsafeNodes;
|
||||
// If the target is not inside a friendly submarine, considerably reduce the hull safety.
|
||||
|
||||
Reference in New Issue
Block a user