(874c38a79) Show keybindings for use or shoot in the tooltips.

This commit is contained in:
Joonas Rikkonen
2019-04-04 11:08:33 +03:00
parent d4752bb6a0
commit 7eb03ea6b3
56 changed files with 587 additions and 850 deletions
@@ -204,7 +204,10 @@ namespace Barotrauma
private void Attack(float deltaTime)
{
character.CursorPosition = Enemy.Position;
character.SetInput(InputType.Aim, false, true);
if (Weapon.RequireAimToUse)
{
character.SetInput(InputType.Aim, false, true);
}
if (WeaponComponent is MeleeWeapon meleeWeapon)
{
if (Vector2.DistanceSquared(character.Position, Enemy.Position) <= meleeWeapon.Range * meleeWeapon.Range)
@@ -161,7 +161,10 @@ namespace Barotrauma
private void OperateRepairTool(float deltaTime)
{
character.CursorPosition = Item.Position;
character.SetInput(InputType.Aim, false, true);
if (Item.RequireAimToUse)
{
character.SetInput(InputType.Aim, false, true);
}
Vector2 fromToolToTarget = Item.Position - repairTool.Item.Position;
if (fromToolToTarget.LengthSquared() < MathUtils.Pow(repairTool.Range / 2, 2))
{