From 5b019621b7562bac4c932a00e431b8b7f788bcfb Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Fri, 27 Jul 2018 11:14:09 +0300 Subject: [PATCH] Fixed sea floor having a wrong collision category, causing artifacts to spawn below it. Closes #532 --- Barotrauma/BarotraumaShared/Source/Map/Levels/LevelWall.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Barotrauma/BarotraumaShared/Source/Map/Levels/LevelWall.cs b/Barotrauma/BarotraumaShared/Source/Map/Levels/LevelWall.cs index b79ba05fc..306a7ad40 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Levels/LevelWall.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Levels/LevelWall.cs @@ -30,6 +30,7 @@ namespace Barotrauma vertices[3] = vertices[1] + extendAmount; VoronoiCell wallCell = new VoronoiCell(vertices); + wallCell.CellType = CellType.Edge; wallCell.edges[0].cell1 = wallCell; wallCell.edges[1].cell1 = wallCell; wallCell.edges[2].cell1 = wallCell; @@ -47,6 +48,10 @@ namespace Barotrauma } bodies = CaveGenerator.GeneratePolygons(cells, level, out List triangles, false); + foreach (var body in bodies) + { + body.CollisionCategories = Physics.CollisionLevel; + } #if CLIENT List bodyVertices = CaveGenerator.GenerateRenderVerticeList(triangles);