(b0f5305f2) Unstable v0.9.10.0

This commit is contained in:
Juan Pablo Arce
2020-05-22 08:21:34 -03:00
parent 3d2b7bcf63
commit 4f8bd39789
75 changed files with 1023 additions and 407 deletions
@@ -370,6 +370,30 @@ namespace Barotrauma.Lights
}
}
public static void RecalculateAll(Submarine sub)
{
var chList = HullLists.Find(h => h.Submarine == sub);
if (chList != null)
{
foreach (ConvexHull ch in chList.List)
{
ch.overlappingHulls.Clear();
for (int i = 0; i < 4; i++)
{
ch.ignoreEdge[i] = false;
}
}
for (int i = 0; i < chList.List.Count; i++)
{
for (int j = i + 1; j < chList.List.Count; j++)
{
chList.List[i].MergeOverlappingSegments(chList.List[j]);
chList.List[j].MergeOverlappingSegments(chList.List[i]);
}
}
}
}
public void SetVertices(Vector2[] points, Matrix? rotationMatrix = null)
{
Debug.Assert(points.Length == 4, "Only rectangular convex hulls are supported");
@@ -31,7 +31,7 @@ namespace Barotrauma
Stream = sound.Stream;
Range = element.GetAttributeFloat("range", 1000.0f);
Volume = element.GetAttributeFloat("volume", 1.0f);
sound.DisableMuffle = element.GetAttributeBool("disablemuffle", false);
sound.IgnoreMuffling = element.GetAttributeBool("dontmuffle", false);
}
}