(220a59c65) Fixed nullref exception in AIObjectiveRescure.Act if the character has no FindSafety objective
This commit is contained in:
@@ -90,7 +90,8 @@ namespace Barotrauma
|
||||
if (findSafety == null)
|
||||
{
|
||||
// Ensure that we have the find safety objective (should always be the case)
|
||||
objectiveManager.AddObjective(new AIObjectiveFindSafety(character, objectiveManager));
|
||||
findSafety = new AIObjectiveFindSafety(character, objectiveManager);
|
||||
objectiveManager.AddObjective(findSafety);
|
||||
}
|
||||
safeHull = findSafety.FindBestHull(HumanAIController.VisibleHulls);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user