(c490f5118) Fixed bots not appearing to use repair tools or weapons client-side when repairing something or attacking (i.e. they aimed the item but never fired/used it)

This commit is contained in:
Joonas Rikkonen
2019-04-11 18:24:01 +03:00
parent c9cdbcc7ed
commit 3eaec8bbc6
2 changed files with 3 additions and 0 deletions

View File

@@ -235,6 +235,7 @@ namespace Barotrauma
{
if (Vector2.DistanceSquared(character.Position, Enemy.Position) <= meleeWeapon.Range * meleeWeapon.Range)
{
character.SetInput(InputType.Shoot, false, true);
Weapon.Use(deltaTime, character);
}
}
@@ -264,6 +265,7 @@ namespace Barotrauma
}
if (target != null && target == Enemy)
{
character.SetInput(InputType.Shoot, false, true);
Weapon.Use(deltaTime, character);
}
}

View File

@@ -322,6 +322,7 @@ namespace Barotrauma.Items.Components
// If the character is climbing, ignore the check, because we cannot aim while climbing.
if (VectorExtensions.Angle(VectorExtensions.Forward(item.body.TransformedRotation), fromItemToLeak) < MathHelper.PiOver4)
{
character.SetInput(InputType.Shoot, false, true);
Use(deltaTime, character);
}
else