(c4338b107) Disable aiming when interacting with an item other than ladders.

This commit is contained in:
Joonas Rikkonen
2019-04-04 11:06:44 +03:00
parent 0cd81c6a99
commit 3f05035c18
6 changed files with 19 additions and 15 deletions
@@ -79,7 +79,8 @@ namespace Barotrauma.Items.Components
if (!throwing)
{
if (picker.IsKeyDown(InputType.Aim))
bool aim = picker.IsKeyDown(InputType.Aim) && (picker.SelectedConstruction == null || picker.SelectedConstruction.GetComponent<Ladder>() != null);
if (aim)
{
throwPos = MathUtils.WrapAnglePi(System.Math.Min(throwPos + deltaTime * 5.0f, MathHelper.PiOver2));
ac.HoldItem(deltaTime, item, handlePos, aimPos, Vector2.Zero, false, throwPos);