Bunch of crew AI bugfixes/improvements:

- replacing empty oxygen tanks
- fixed characters only fixing leaks in the outer hull
- prioritizing large leaks over small ones
- fixed characters doing nothing after fixing all the leaks (and sinking to the bottom if they happen to be outside)
- more accurate welder aiming
- AIObjectiveGetItem makes the characters go to the cabinet/container an item is inside, not to the actual item (which may not be actually positioned at the container)
This commit is contained in:
Regalis
2016-03-16 17:41:59 +02:00
parent 804510b144
commit d6a57f9533
15 changed files with 228 additions and 163 deletions
@@ -104,10 +104,13 @@ namespace Barotrauma
var indoorsSteering = character.AIController.SteeringManager as IndoorsSteeringManager;
if (indoorsSteering.CurrentPath != null && indoorsSteering.HasOutdoorsNodes)
if (indoorsSteering.CurrentPath.Unreachable)
{
AddSubObjective(new AIObjectiveGetItem(character, "Diving Suit", true));
indoorsSteering.SteeringWander();
}
else if (indoorsSteering.CurrentPath != null && indoorsSteering.HasOutdoorsNodes)
{
AddSubObjective(new AIObjectiveFindDivingGear(character, true));
}
}
}