- Fixed structure-gap links not being saved
- Saving gap orientation - Waypoint generation works with small hulls and even if SubBody doesn't exist - Fixed charactermode when a editing mid-round - Fixed powercontainer charge progressbar position
This commit is contained in:
@@ -178,6 +178,34 @@ namespace Barotrauma
|
||||
InsertToList();
|
||||
}
|
||||
|
||||
public static Rectangle GetBorders()
|
||||
{
|
||||
if (!hullList.Any()) return Rectangle.Empty;
|
||||
|
||||
Rectangle rect = hullList[0].rect;
|
||||
|
||||
foreach (Hull hull in hullList)
|
||||
{
|
||||
if (hull.Rect.X < rect.X)
|
||||
{
|
||||
rect.Width += rect.X - hull.rect.X;
|
||||
rect.X = hull.rect.X;
|
||||
|
||||
}
|
||||
if (hull.rect.Right > rect.Right) rect.Width = hull.rect.Right - rect.X;
|
||||
|
||||
if (hull.rect.Y > rect.Y)
|
||||
{
|
||||
rect.Height += hull.rect.Y - rect.Y;
|
||||
|
||||
rect.Y = hull.rect.Y;
|
||||
}
|
||||
if (hull.rect.Y - hull.rect.Height < rect.Y - rect.Height) rect.Height = rect.Y - (hull.rect.Y - hull.rect.Height);
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
public static void GenerateEntityGrid()
|
||||
{
|
||||
entityGrid = new EntityGrid(Submarine.Borders, 200.0f);
|
||||
|
||||
Reference in New Issue
Block a user