OBT/1.2.1(Summer update)
Sync with upstream
This commit is contained in:
+1
-1
@@ -133,7 +133,7 @@ namespace Barotrauma
|
||||
bool operateExtinguisher = !moveCloser || (dist < extinguisher.Range * 1.2f && character.CanSeeTarget(targetHull));
|
||||
if (operateExtinguisher)
|
||||
{
|
||||
character.CursorPosition = fs.Position;
|
||||
character.CursorPosition = FarseerPhysics.ConvertUnits.ToDisplayUnits(Submarine.GetRelativeSimPositionFromWorldPosition(fs.WorldPosition, character.Submarine, fs.Submarine));
|
||||
Vector2 fromCharacterToFireSource = fs.WorldPosition - character.WorldPosition;
|
||||
character.CursorPosition += VectorExtensions.Forward(extinguisherItem.body.TransformedRotation + (float)Math.Sin(sinTime) / 2, fromCharacterToFireSource.Length() / 2);
|
||||
if (extinguisherItem.RequireAimToUse)
|
||||
|
||||
+10
@@ -173,6 +173,16 @@ namespace Barotrauma
|
||||
if (character.CanInteractWith(Item, out _, checkLinked: false))
|
||||
{
|
||||
waitTimer += deltaTime;
|
||||
|
||||
//if we're climbing upwards to the item, ensure the character stays within arm's length of it
|
||||
//without this, the character can get stuck in a loop where the GoTo objective takes them close enough to the item,
|
||||
//then the character shifts a bit downwards on the ladder and goes outside interaction range, and the GoTo objective kicks in again
|
||||
if (character.IsClimbing &&
|
||||
Item.WorldPosition.Y > character.WorldPosition.Y + FarseerPhysics.ConvertUnits.ToDisplayUnits(character.AnimController.ArmLength))
|
||||
{
|
||||
character.AIController.SteeringManager.SteeringManual(deltaTime, Vector2.UnitY);
|
||||
}
|
||||
|
||||
if (waitTimer < WaitTimeBeforeRepair) { return; }
|
||||
|
||||
HumanAIController.FaceTarget(Item);
|
||||
|
||||
Reference in New Issue
Block a user