(ccef21f63) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev

This commit is contained in:
Joonas Rikkonen
2019-04-06 17:49:31 +03:00
parent 45c1ed499a
commit 14d0daf16d
18 changed files with 333 additions and 180 deletions
@@ -168,13 +168,14 @@ namespace Barotrauma
}
}
public Hull FindBestHull()
public Hull FindBestHull(IEnumerable<Hull> ignoredHulls = null)
{
Hull bestHull = character.CurrentHull;
float bestValue = currenthullSafety;
Hull bestHull = null;
float bestValue = 0;
foreach (Hull hull in Hull.hullList)
{
if (hull.Submarine == null) { continue; }
if (ignoredHulls != null && ignoredHulls.Contains(hull)) { continue; }
float hullSafety = 0;
if (character.Submarine != null && SteeringManager == PathSteering)
{