(17fdbc9de) New path is also needed if the old becomes unreachable. Ignore the new path if it's unreachable.

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:29:40 +03:00
parent 75640a321f
commit 9521f0ae2f
9 changed files with 74 additions and 103 deletions
@@ -85,12 +85,18 @@ namespace Barotrauma
if (Character.Submarine != null || SelectedAiTarget?.Entity?.Submarine != null)
{
if (steeringManager != insideSteering) insideSteering.Reset();
if (steeringManager != insideSteering)
{
insideSteering.Reset();
}
steeringManager = insideSteering;
}
else
{
if (steeringManager != outsideSteering) outsideSteering.Reset();
if (steeringManager != outsideSteering)
{
outsideSteering.Reset();
}
steeringManager = outsideSteering;
}