OBT/1.2.0(Spring Update)

Sync with Upstream
This commit is contained in:
NotAlwaysTrue
2026-04-25 13:25:41 +08:00
committed by GitHub
parent 5207b381b7
commit 59bc21973a
421 changed files with 24090 additions and 11391 deletions
@@ -258,13 +258,14 @@ namespace Barotrauma
protected override bool CheckObjectiveState()
{
if (character.Submarine is { TeamID: CharacterTeamType.FriendlyNPC } && character.Submarine == Enemy.Submarine)
// In a friendly outpost, and the target is still in the outpost
if (character.Submarine is { Info.IsOutpost: true } && character.IsOnFriendlyTeam(character.Submarine.TeamID) &&
character.Submarine == Enemy.Submarine)
{
// Target still in the outpost
// Outpost guards shouldn't lose the target in friendly outposts,
// However, if we are not a guard, let's ensure that we allow the cooldown.
if (character.TeamID == CharacterTeamType.FriendlyNPC && !character.IsSecurity)
{
// Outpost guards shouldn't lose the target in friendly outposts,
// However, if we are not a guard, let's ensure that we allow the cooldown.
allowCooldown = true;
}
}
@@ -286,7 +287,8 @@ namespace Barotrauma
{
allowCooldown = true;
// Target not in the outpost anymore.
if (character.CanSeeTarget(Enemy))
if (character.Submarine.IsConnectedTo(Enemy.Submarine) &&
character.CanSeeTarget(Enemy))
{
allowCooldown = false;
coolDownTimer = DefaultCoolDown;
@@ -389,7 +391,7 @@ namespace Barotrauma
HumanAIController.AutoFaceMovement = false;
if (!gotoObjective.ShouldRun(true))
{
ForceWalk = true;
ForceWalkTemporarily = true;
}
}
}
@@ -468,7 +470,7 @@ namespace Barotrauma
isMoving = true;
if (!IsEnemyClose(MeleeDistance))
{
ForceWalk = true;
ForceWalkTemporarily = true;
}
HumanAIController.FaceTarget(Enemy);
HumanAIController.AutoFaceMovement = false;
@@ -1234,7 +1236,7 @@ namespace Barotrauma
}
if (isAimBlocked)
{
ForceWalk = true;
ForceWalkTemporarily = true;
}
if (!followTargetObjective.IsCloseEnough)
{