Autopilot uses submarine position as a "reference position" (instead of the position of the nav terminal), radar display bugfix, ragdolls aren't teleported outside the sub if they're in a tiny gap between hulls (e.g. passing through a broken wall between rooms)

This commit is contained in:
Regalis
2016-04-20 17:28:20 +03:00
parent 188220c464
commit e271873a43
4 changed files with 64 additions and 48 deletions
@@ -147,7 +147,7 @@ namespace Barotrauma.Items.Components
}
else
{
float simScale = ConvertUnits.ToSimUnits(displayScale);
float simScale = displayScale * Physics.DisplayToSimRation;
Vector2 offset = ConvertUnits.ToSimUnits(Submarine.Loaded.WorldPosition - item.WorldPosition);
@@ -158,8 +158,7 @@ namespace Barotrauma.Items.Components
Vector2 end = (Submarine.Loaded.HullVertices[(i + 1) % Submarine.Loaded.HullVertices.Count] + offset) * simScale;
end.Y = -end.Y;
GUI.DrawLine(spriteBatch, center + start, center + end, Color.Green);
GUI.DrawLine(spriteBatch, center + start, center + end, Color.Green);
}
}