(4efa46ffe) Limit the base priority due to devotion to 10.
This commit is contained in:
@@ -1088,6 +1088,8 @@ namespace Barotrauma
|
||||
|
||||
private bool IsProperlyLatchedOnSub => LatchOntoAI != null && LatchOntoAI.IsAttachedToSub && SelectedAiTarget?.Entity == wallTarget?.Structure;
|
||||
|
||||
private bool IsProperlyLatchedOnSub => LatchOntoAI != null && LatchOntoAI.IsAttachedToSub && SelectedAiTarget?.Entity == wallTarget?.Structure;
|
||||
|
||||
//goes through all the AItargets, evaluates how preferable it is to attack the target,
|
||||
//whether the Character can see/hear the target and chooses the most preferable target within
|
||||
//sight/hearing range
|
||||
|
||||
@@ -98,7 +98,8 @@ namespace Barotrauma
|
||||
if (avg < 1) { return 0; }
|
||||
float maxMultiplier = MathHelper.Min(PriorityModifier, 1);
|
||||
float max = MathHelper.Min((AIObjectiveManager.OrderPriority - 1) * maxMultiplier, 90);
|
||||
float value = MathHelper.Min((Priority + avg) / 100 * PriorityModifier, 1);
|
||||
float devotion = MathHelper.Min(10, Priority);
|
||||
float value = MathHelper.Min((devotion + avg) / 100 * PriorityModifier, 1);
|
||||
return MathHelper.Lerp(0, max, value);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -49,7 +49,8 @@ namespace Barotrauma
|
||||
{
|
||||
return AIObjectiveManager.OrderPriority;
|
||||
}
|
||||
float value = (Priority + (AIObjectiveManager.OrderPriority / 2)) * PriorityModifier;
|
||||
float devotion = MathHelper.Min(10, Priority);
|
||||
float value = (devotion + (AIObjectiveManager.OrderPriority / 2)) * PriorityModifier;
|
||||
float maxMultiplier = MathHelper.Min(PriorityModifier, 1);
|
||||
float max = MathHelper.Min((AIObjectiveManager.OrderPriority - 1) * maxMultiplier, 90);
|
||||
return MathHelper.Clamp(value, 0, max);
|
||||
|
||||
@@ -2674,6 +2674,10 @@ namespace Barotrauma
|
||||
GameMain.GameSession?.CrewManager?.RemoveCharacter(this);
|
||||
#endif
|
||||
|
||||
#if CLIENT
|
||||
GameMain.GameSession?.CrewManager?.RemoveCharacter(this);
|
||||
#endif
|
||||
|
||||
#if CLIENT
|
||||
GameMain.GameSession?.CrewManager?.RemoveCharacter(this);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user