Fix LightBehaviourComponent stinky warning.

This commit is contained in:
Vera Aguilera Puerto 2021-11-08 11:59:14 +01:00
parent 2d3077f560
commit 0081c3054d
1 changed files with 3 additions and 1 deletions

View File

@ -391,7 +391,9 @@ namespace Content.Client.Light.Components
base.Startup();
CopyLightSettings();
Owner.EnsureComponentWarn<AnimationPlayerComponent>();
// TODO: Do NOT ensure component here. And use eventbus events instead...
Owner.EnsureComponent<AnimationPlayerComponent>();
if (Owner.TryGetComponent(out AnimationPlayerComponent? animation))
{