From f4ed2ed2173afe138b28ee18c465aa602851429e Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 18 May 2019 17:22:57 +0300 Subject: [PATCH] (28452a31b) Clean up an add a note. --- .../Source/Characters/AI/PathFinder.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs index 8e822ac4f..45adac1ec 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/PathFinder.cs @@ -29,7 +29,7 @@ namespace Barotrauma public Vector2 Position { - get {return position;} + get { return position; } } public PathNode(WayPoint wayPoint) @@ -216,6 +216,7 @@ namespace Barotrauma { Vector2 nodePos = node.Position; + // TODO: use squared distance float dist = Vector2.Distance(end, nodePos); if (insideSubmarine) { @@ -229,13 +230,6 @@ namespace Barotrauma //if searching for a path inside the sub, make sure the waypoint is visible if (insideSubmarine) { - // Doesn't seem to work - //var body = Submarine.CheckVisibility(end, node.Waypoint.SimPosition); - //if (body != null && body.UserData is Structure) - //{ - // continue; - //} - var body = Submarine.PickBody(end, node.Waypoint.SimPosition, null, Physics.CollisionWall | Physics.CollisionLevel | Physics.CollisionStairs );