Lighting bugfixes, setting camera position to character on shift start

This commit is contained in:
Regalis
2015-12-26 22:35:28 +02:00
parent 064e2eadd0
commit 8c032d8368
10 changed files with 49 additions and 26 deletions
+4 -1
View File
@@ -148,6 +148,8 @@ namespace Barotrauma.Lights
cachedShadows.Clear();
vertices = points;
CalculateDimensions();
}
public bool Intersects(Rectangle rect)
@@ -307,6 +309,7 @@ namespace Barotrauma.Lights
else
{
cachedShadow = new CachedShadow(shadowVertices, penumbraVertices, light.Position, shadowVertexCount, 0);
cachedShadows.Remove(light);
cachedShadows.Add(light, cachedShadow);
}
}
@@ -350,7 +353,7 @@ namespace Barotrauma.Lights
else
{
shadowEffect.CurrentTechnique.Passes[0].Apply();
graphicsDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, shadowVertexCount);
graphicsDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, shadowVertexCount*2 - 2);
}
}