Fixed characters being able to aim with items that have no aimPos configured (causing them to hold two-handed items like shells an crates in one hand when holding the aim button). Closes #613

This commit is contained in:
Joonas Rikkonen
2018-08-13 17:14:49 +03:00
parent 1c6a29dbc6
commit 8d5e5a8a15

View File

@@ -358,7 +358,7 @@ namespace Barotrauma.Items.Components
if (picker.HasSelectedItem(item))
{
picker.AnimController.HoldItem(deltaTime, item, handlePos, holdPos, aimPos, picker.IsKeyDown(InputType.Aim), holdAngle);
picker.AnimController.HoldItem(deltaTime, item, handlePos, holdPos, aimPos, picker.IsKeyDown(InputType.Aim) && aimPos != Vector2.Zero, holdAngle);
}
else
{