Better logic for determining which convex hulls are in the range of a lightsource (separate convexhull lists for each sub)

This commit is contained in:
Regalis
2016-06-30 17:50:02 +03:00
parent 38c5251005
commit aae24b2b2c
6 changed files with 218 additions and 67 deletions
@@ -102,7 +102,7 @@ namespace Barotrauma.Items.Components
: base (item, element)
{
light = new LightSource(element);
light.Submarine = item.CurrentHull == null ? null : item.CurrentHull.Submarine;
light.ParentSub = item.CurrentHull == null ? null : item.CurrentHull.Submarine;
light.Position = item.Position;
light.CastShadows = castShadows;
@@ -121,7 +121,7 @@ namespace Barotrauma.Items.Components
{
base.Update(deltaTime, cam);
light.Submarine = item.Submarine;
light.ParentSub = item.Submarine;
ApplyStatusEffects(ActionType.OnActive, deltaTime);