(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:
+4
-3
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user