Following bugs fix (#8992)

This commit is contained in:
Kara
2022-06-22 19:36:30 -07:00
committed by GitHub
parent c82ab6411c
commit e46b989aba
2 changed files with 10 additions and 1 deletions

View File

@@ -30,6 +30,12 @@ public sealed class OrbitVisualsSystem : EntitySystem
component.OrbitLength = _robustRandom.NextFloat(0.5f * component.OrbitLength, 1.5f * component.OrbitLength);
if (TryComp<SpriteComponent>(uid, out var sprite))
{
sprite.EnableDirectionOverride = true;
sprite.DirectionOverride = Direction.South;
}
var animationPlayer = EntityManager.EnsureComponent<AnimationPlayerComponent>(uid);
if (animationPlayer.HasRunningAnimation(_orbitAnimationKey))
return;
@@ -44,9 +50,11 @@ public sealed class OrbitVisualsSystem : EntitySystem
private void OnComponentRemove(EntityUid uid, OrbitVisualsComponent component, ComponentRemove args)
{
if (!TryComp<ISpriteComponent>(uid, out var sprite))
if (!TryComp<SpriteComponent>(uid, out var sprite))
return;
sprite.EnableDirectionOverride = false;
var animationPlayer = EntityManager.EnsureComponent<AnimationPlayerComponent>(uid);
if (animationPlayer.HasRunningAnimation(_orbitAnimationKey))
{

View File

@@ -31,6 +31,7 @@
- type: Ghost
- type: GhostRadio
- type: Sprite
overrideContainerOcclusion: true # Ghosts always show up regardless of where they're contained.
netsync: false
noRot: true
drawdepth: Ghosts