Fixed map collider generation
I didn't realize the bodies were generated in the same method that generates the mesh triangles, TODO consider splitting that
This commit is contained in:
@@ -350,6 +350,7 @@ namespace Barotrauma
|
||||
|
||||
public static List<Body> GeneratePolygons(List<VoronoiCell> cells, out List<VertexPositionTexture> verticeList, bool setSolid=true)
|
||||
{
|
||||
//TODO: consider separating body generation from render triangle generation
|
||||
verticeList = new List<VertexPositionTexture>();
|
||||
var bodies = new List<Body>();
|
||||
|
||||
|
||||
@@ -440,10 +440,11 @@ namespace Barotrauma
|
||||
|
||||
List<VoronoiCell> cellsWithBody = new List<VoronoiCell>(cells);
|
||||
|
||||
#if CLIENT
|
||||
List<VertexPositionTexture> bodyVertices;
|
||||
bodies = CaveGenerator.GeneratePolygons(cellsWithBody, out bodyVertices);
|
||||
|
||||
#if CLIENT
|
||||
|
||||
renderer.SetBodyVertices(bodyVertices.ToArray());
|
||||
renderer.SetWallVertices(CaveGenerator.GenerateWallShapes(cells));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user