fix lantern visualizer animation error (#4800)

* fix lantern-visualizer

* remove deleted check

* Remove other component.Deleted checks
This commit is contained in:
Leon Friedrich
2021-10-21 12:45:46 +11:00
committed by GitHub
parent 6dccd0667f
commit 339982d05b
7 changed files with 3 additions and 29 deletions

View File

@@ -17,11 +17,6 @@ namespace Content.Client.Atmos.Visualizers
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (component.Deleted)
{
return;
}
if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite)) if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite))
{ {
return; return;

View File

@@ -29,11 +29,6 @@ namespace Content.Client.Atmos.Visualizers
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (component.Deleted)
{
return;
}
if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite)) if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite))
{ {
return; return;

View File

@@ -37,11 +37,6 @@ namespace Content.Client.Chemistry.Visualizers
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (component.Deleted)
{
return;
}
if (component.TryGetData<Angle>(VaporVisuals.Rotation, out var radians)) if (component.TryGetData<Angle>(VaporVisuals.Rotation, out var radians))
{ {
SetRotation(component, radians); SetRotation(component, radians);

View File

@@ -34,6 +34,9 @@ namespace Content.Client.Light
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (!component.Initialized)
return;
PlayAnimation(component); PlayAnimation(component);
} }

View File

@@ -15,11 +15,6 @@ namespace Content.Client.Light.Visualizers
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (component.Deleted)
{
return;
}
if (component.TryGetData(ExpendableLightVisuals.Behavior, out string lightBehaviourID)) if (component.TryGetData(ExpendableLightVisuals.Behavior, out string lightBehaviourID))
{ {
if (component.Owner.TryGetComponent<LightBehaviourComponent>(out var lightBehaviour)) if (component.Owner.TryGetComponent<LightBehaviourComponent>(out var lightBehaviour))

View File

@@ -59,10 +59,6 @@ namespace Content.Client.Light.Visualizers
public override void OnChangeData(AppearanceComponent component) public override void OnChangeData(AppearanceComponent component)
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (component.Deleted)
{
return;
}
if (component.TryGetData(HandheldLightVisuals.Power, if (component.TryGetData(HandheldLightVisuals.Power,
out HandheldLightPowerStates state)) out HandheldLightPowerStates state))

View File

@@ -15,11 +15,6 @@ namespace Content.Client.Pointing
{ {
base.OnChangeData(component); base.OnChangeData(component);
if (component.Deleted)
{
return;
}
if (component.TryGetData<double>(RoguePointingArrowVisuals.Rotation, out var degrees)) if (component.TryGetData<double>(RoguePointingArrowVisuals.Rotation, out var degrees))
{ {
SetRotation(component, Angle.FromDegrees(degrees)); SetRotation(component, Angle.FromDegrees(degrees));