Wall convexhulls are split every 5 sections, convexhull edges that overlap with another convexhull are ignored (i.e. unneccessarys shadows aren't drawn where two walls meet)

This commit is contained in:
Regalis
2016-06-01 20:58:03 +03:00
parent 0621f6c9e3
commit 50bee3da41
2 changed files with 44 additions and 3 deletions
+7
View File
@@ -257,6 +257,13 @@ namespace Barotrauma
var mergedSections = new List<WallSection>();
foreach (var section in sections)
{
if (mergedSections.Count > 5)
{
mergedSections.Add(section);
GenerateMergedHull(mergedSections);
continue;
}
// if there is a gap and we have sections to merge, do it.
if (section.gap != null)
{