(4b54fb4bf) Refactor AIObjectiveCombat and the reactions to the damage. Fixes bots not reacting to any damage done with repair tools. Now they should flee (but not retaliate).

This commit is contained in:
Joonas Rikkonen
2019-04-05 16:20:11 +03:00
parent 501a114000
commit 25768d8845
11 changed files with 214 additions and 214 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)
{