(e1b4346f3) Fix enemies not being able to get into the sub via vertical hatches. Removed the velocity manipulation, because it only caused issues.
This commit is contained in:
@@ -568,29 +568,11 @@ namespace Barotrauma
|
||||
//steer through the door manually if it's open or broken
|
||||
if (door?.LinkedGap?.FlowTargetHull != null && !door.LinkedGap.IsRoomToRoom && (door.IsOpen || door.Item.Condition <= 0.0f))
|
||||
{
|
||||
LatchOntoAI?.DeattachFromBody();
|
||||
Character.AnimController.ReleaseStuckLimbs();
|
||||
var velocity = Vector2.Normalize(door.LinkedGap.FlowTargetHull.WorldPosition - Character.WorldPosition);
|
||||
if (door.LinkedGap.IsHorizontal)
|
||||
{
|
||||
if (Character.WorldPosition.Y < door.Item.WorldRect.Y && Character.WorldPosition.Y > door.Item.WorldRect.Y - door.Item.Rect.Height)
|
||||
{
|
||||
velocity.Y = 0;
|
||||
LatchOntoAI?.DeattachFromBody();
|
||||
Character.AnimController.ReleaseStuckLimbs();
|
||||
steeringManager.SteeringManual(deltaTime, velocity);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Character.WorldPosition.X < door.Item.WorldRect.X && Character.WorldPosition.X > door.Item.WorldRect.Right)
|
||||
{
|
||||
velocity.X = 0;
|
||||
LatchOntoAI?.DeattachFromBody();
|
||||
Character.AnimController.ReleaseStuckLimbs();
|
||||
steeringManager.SteeringManual(deltaTime, velocity);
|
||||
return;
|
||||
}
|
||||
}
|
||||
steeringManager.SteeringManual(deltaTime, velocity);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Barotrauma
|
||||
public static bool EditWater, EditFire;
|
||||
public const float OxygenDistributionSpeed = 500.0f;
|
||||
public const float OxygenDeteriorationSpeed = 0.3f;
|
||||
public const float OxygenConsumptionSpeed = 700.0f;
|
||||
public const float OxygenConsumptionSpeed = 1000.0f;
|
||||
|
||||
public const int WaveWidth = 32;
|
||||
public static float WaveStiffness = 0.02f;
|
||||
|
||||
Reference in New Issue
Block a user