(c5f9e6070) Fixed lighting artifacts cause by the LOS changes
This commit is contained in:
@@ -407,11 +407,11 @@ namespace Barotrauma.Lights
|
||||
/// <summary>
|
||||
/// Returns the segments that are facing towards viewPosition
|
||||
/// </summary>
|
||||
public void GetVisibleSegments(Vector2 viewPosition, List<Segment> visibleSegments)
|
||||
public void GetVisibleSegments(Vector2 viewPosition, List<Segment> visibleSegments, bool ignoreEdges)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (ignoreEdge[i]) continue;
|
||||
if (ignoreEdge[i] && ignoreEdges) continue;
|
||||
|
||||
Vector2 pos1 = vertices[i].WorldPos;
|
||||
Vector2 pos2 = vertices[(i + 1) % 4].WorldPos;
|
||||
|
||||
@@ -453,7 +453,7 @@ namespace Barotrauma.Lights
|
||||
foreach (ConvexHull hull in hulls)
|
||||
{
|
||||
hull.RefreshWorldPositions();
|
||||
hull.GetVisibleSegments(drawPos, visibleSegments);
|
||||
hull.GetVisibleSegments(drawPos, visibleSegments, ignoreEdges: false);
|
||||
}
|
||||
|
||||
//Generate new points at the intersections between segments
|
||||
|
||||
Reference in New Issue
Block a user