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:
@@ -40,8 +40,11 @@ namespace Barotrauma
|
||||
|
||||
if (currentTarget != null)
|
||||
{
|
||||
var path = pathSteering.PathFinder.FindPath(character.SimPosition, currentTarget.SimPosition);
|
||||
if (path.Cost > 200.0f) return;
|
||||
Vector2 pos = character.SimPosition;
|
||||
if (character != null && character.Submarine == null) pos -= Submarine.Loaded.SimPosition;
|
||||
|
||||
var path = pathSteering.PathFinder.FindPath(pos, currentTarget.SimPosition);
|
||||
if (path.Cost > 200.0f && character.AnimController.CurrentHull!=null) return;
|
||||
|
||||
pathSteering.SetPath(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user