(a17abe3fa) Remove a not so useful loop from a method, which might be used often.

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:25:12 +03:00
parent 52d3737416
commit e500ba2bdf
28 changed files with 400 additions and 244 deletions
@@ -495,10 +495,10 @@ namespace Barotrauma.Items.Components
character.CursorPosition = closestEnemy.WorldPosition;
if (item.Submarine != null) character.CursorPosition -= item.Submarine.Position;
//force aim input even if the turret doesn't require it,
//because the cursor position (and consequently, turret aim direction) is only synced to clients when aiming
character.SetInput(InputType.Aim, false, true);
if (item.RequireAimToUse)
{
character.SetInput(InputType.Aim, false, true);
}
float enemyAngle = MathUtils.VectorToAngle(closestEnemy.WorldPosition - item.WorldPosition);
float turretAngle = -rotation;