Unstable 0.14.4.0
This commit is contained in:
@@ -479,7 +479,7 @@ namespace Barotrauma
|
||||
Character.AnimController.InWater ||
|
||||
Character.AnimController.HeadInWater ||
|
||||
Character.CurrentHull == null ||
|
||||
(Character.Submarine.TeamID != Character.TeamID && !Character.IsEscorted) || // these instances should maybe be combined to a method
|
||||
(Character.Submarine?.TeamID != Character.TeamID && !Character.IsEscorted) || // these instances should maybe be combined to a method
|
||||
ObjectiveManager.IsCurrentObjective<AIObjectiveFindSafety>() ||
|
||||
ObjectiveManager.CurrentObjective.GetSubObjectivesRecursive(true).Any(o => o.KeepDivingGearOn);
|
||||
if (oxygenLow && Character.CurrentHull.Oxygen > 0)
|
||||
|
||||
@@ -244,12 +244,12 @@ namespace Barotrauma
|
||||
availableIssues.Sort((x, y) => y.Importance.CompareTo(x.Importance));
|
||||
attendedIssues.Sort((x, y) => x.Importance.CompareTo(y.Importance));
|
||||
|
||||
ShipIssueWorker mostImportantIssue = availableIssues.First();
|
||||
ShipIssueWorker mostImportantIssue = availableIssues.FirstOrDefault();
|
||||
|
||||
float bestValue = 0f;
|
||||
Character bestCharacter = null;
|
||||
|
||||
if (mostImportantIssue.Importance > MinimumIssueThreshold)
|
||||
if (mostImportantIssue != null && mostImportantIssue.Importance > MinimumIssueThreshold)
|
||||
{
|
||||
IEnumerable<Character> bestCharacters = CrewManager.GetCharactersSortedForOrder(mostImportantIssue.SuggestedOrderPrefab, AlliedCharacters, character, true);
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (bestCharacter != null)
|
||||
if (bestCharacter != null && mostImportantIssue != null)
|
||||
{
|
||||
#if DEBUG
|
||||
ShipCommandLog("Setting " + mostImportantIssue + " for character " + bestCharacter);
|
||||
|
||||
Reference in New Issue
Block a user