(ebf4529cc) Use a uniform way to check if the bot has reached it's target. Should fix issues where bot is stuck when trying to get or operate an item in some cases.
This commit is contained in:
+6
-5
@@ -114,12 +114,13 @@ namespace Barotrauma
|
||||
{
|
||||
goToObjective = null;
|
||||
}
|
||||
TryAddSubObjective(ref goToObjective, () =>
|
||||
new AIObjectiveGoTo(bestHull, character, objectiveManager, getDivingGearIfNeeded: false)
|
||||
TryAddSubObjective(ref goToObjective,
|
||||
constructor: () => new AIObjectiveGoTo(bestHull, character, objectiveManager, getDivingGearIfNeeded: false)
|
||||
{
|
||||
// If we need diving gear, we should already have it, if possible.
|
||||
AllowGoingOutside = HumanAIController.HasDivingSuit(character)
|
||||
}, onAbandon: () => unreachable.Add(goToObjective.Target as Hull));
|
||||
// If we need diving gear, we should already have it, if possible.
|
||||
AllowGoingOutside = HumanAIController.HasDivingSuit(character)
|
||||
},
|
||||
onAbandon: () => unreachable.Add(goToObjective.Target as Hull));
|
||||
}
|
||||
}
|
||||
if (goToObjective != null) { return; }
|
||||
|
||||
Reference in New Issue
Block a user