(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:
@@ -235,6 +235,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (Vector2.DistanceSquared(character.Position, Enemy.Position) <= meleeWeapon.Range * meleeWeapon.Range)
|
if (Vector2.DistanceSquared(character.Position, Enemy.Position) <= meleeWeapon.Range * meleeWeapon.Range)
|
||||||
{
|
{
|
||||||
|
character.SetInput(InputType.Shoot, false, true);
|
||||||
Weapon.Use(deltaTime, character);
|
Weapon.Use(deltaTime, character);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -264,6 +265,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
if (target != null && target == Enemy)
|
if (target != null && target == Enemy)
|
||||||
{
|
{
|
||||||
|
character.SetInput(InputType.Shoot, false, true);
|
||||||
Weapon.Use(deltaTime, character);
|
Weapon.Use(deltaTime, character);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ namespace Barotrauma.Items.Components
|
|||||||
// If the character is climbing, ignore the check, because we cannot aim while climbing.
|
// 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)
|
if (VectorExtensions.Angle(VectorExtensions.Forward(item.body.TransformedRotation), fromItemToLeak) < MathHelper.PiOver4)
|
||||||
{
|
{
|
||||||
|
character.SetInput(InputType.Shoot, false, true);
|
||||||
Use(deltaTime, character);
|
Use(deltaTime, character);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user