aeafa16...4d3cf73

This commit is contained in:
Joonas Rikkonen
2019-03-18 22:57:05 +02:00
parent 3301bed442
commit 23687fbf2f
77 changed files with 2275 additions and 717 deletions
@@ -294,9 +294,10 @@ namespace Barotrauma.Items.Components
character.CursorPosition = leak.Position;
character.SetInput(InputType.Aim, false, true);
if (VectorExtensions.Angle(VectorExtensions.Forward(item.body.TransformedRotation), fromItemToLeak) < MathHelper.PiOver4)
// Press the trigger only when the tool is approximately facing the target.
// If the character is climbing, ignore the check, because we cannot aim while climbing.
if (character.IsClimbing || VectorExtensions.Angle(VectorExtensions.Forward(item.body.TransformedRotation), fromItemToLeak) < MathHelper.PiOver4)
{
// Press the trigger only when the tool is approximately facing the target.
Use(deltaTime, character);
}