(d752a1b58) Fixed lightsprite scale being wrong until the LightComponent is updated for the first time (caused fluorescent lights to look wrong in the sub editor)

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:55:59 +03:00
parent 9dc33984a9
commit 2de6c7e47d
12 changed files with 213 additions and 259 deletions
@@ -144,7 +144,7 @@ namespace Barotrauma.Items.Components
}
public LightComponent(Item item, XElement element)
: base (item, element)
: base(item, element)
{
#if CLIENT
light = new LightSource(element)
@@ -152,7 +152,8 @@ namespace Barotrauma.Items.Components
ParentSub = item.CurrentHull?.Submarine,
Position = item.Position,
CastShadows = castShadows,
IsBackground = drawBehindSubs
IsBackground = drawBehindSubs,
SpriteScale = Vector2.One * item.Scale
};
#endif