Tweaked enemy AI idle behaviour (lighter avoid steering to make the enemies less likely to "bounce" from wall to wall in tight spaces), fix for wander steering breaking if the velocity of the character is Vector2.Zero, different tooltips for suicide button in SP and MP

This commit is contained in:
Regalis
2016-05-08 17:15:02 +03:00
parent be3d418297
commit 1a3da8b29f
3 changed files with 7 additions and 4 deletions

View File

@@ -157,8 +157,8 @@ namespace Barotrauma
}
else
{
steeringManager.SteeringWander(0.8f);
steeringManager.SteeringAvoid(deltaTime, 1.0f);
steeringManager.SteeringAvoid(deltaTime, 0.1f);
steeringManager.SteeringWander(0.5f);
}
attackingLimb = null;

View File

@@ -93,7 +93,7 @@ namespace Barotrauma
protected virtual Vector2 DoSteeringWander(float speed = 1.0f)
{
Vector2 circleCenter = (host.Velocity == Vector2.Zero) ? new Vector2(speed, 0.0f) : host.Velocity;
Vector2 circleCenter = (host.Steering == Vector2.Zero) ? new Vector2(speed, 0.0f) : host.Steering;
circleCenter = Vector2.Normalize(circleCenter) * CircleDistance;
Vector2 displacement = new Vector2(

View File

@@ -181,7 +181,10 @@ namespace Barotrauma
suicideButton = new GUIButton(
new Rectangle(new Point(GameMain.GraphicsWidth / 2 - 60, 20), new Point(120, 20)), "Give in", GUI.Style);
suicideButton.ToolTip = "Let go of your character and enter spectator mode (other players will now longer be able to revive you)";
suicideButton.ToolTip = GameMain.NetworkMember == null ?
"The character can no longer be revived if you give in." :
"Let go of your character and enter spectator mode (other players will now longer be able to revive you)";
suicideButton.OnClicked = (button, userData) =>
{