Sending level seed & level gen errors to GameAnalytics

This commit is contained in:
Joonas Rikkonen
2018-07-20 14:17:59 +03:00
parent 07de2b2a0f
commit a61ac1716d
5 changed files with 26 additions and 8 deletions
@@ -18,7 +18,7 @@ namespace Barotrauma
private List<Body> bodies;
public LevelWall(List<Vector2> edgePositions, Vector2 extendAmount, Color color)
public LevelWall(List<Vector2> edgePositions, Vector2 extendAmount, Color color, Level level)
{
cells = new List<VoronoiCell>();
for (int i = 0; i < edgePositions.Count - 1; i++)
@@ -46,13 +46,13 @@ namespace Barotrauma
cells.Add(wallCell);
}
bodies = CaveGenerator.GeneratePolygons(cells, out List<Vector2[]> triangles, false);
bodies = CaveGenerator.GeneratePolygons(cells, level, out List<Vector2[]> triangles, false);
#if CLIENT
List<VertexPositionTexture> bodyVertices = CaveGenerator.GenerateRenderVerticeList(triangles);
SetBodyVertices(bodyVertices.ToArray(), color);
SetWallVertices(CaveGenerator.GenerateWallShapes(cells), color);
SetWallVertices(CaveGenerator.GenerateWallShapes(cells, level), color);
#endif
}