Following bugs fix (#8992)
This commit is contained in:
@@ -30,6 +30,12 @@ public sealed class OrbitVisualsSystem : EntitySystem
|
|||||||
|
|
||||||
component.OrbitLength = _robustRandom.NextFloat(0.5f * component.OrbitLength, 1.5f * component.OrbitLength);
|
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);
|
var animationPlayer = EntityManager.EnsureComponent<AnimationPlayerComponent>(uid);
|
||||||
if (animationPlayer.HasRunningAnimation(_orbitAnimationKey))
|
if (animationPlayer.HasRunningAnimation(_orbitAnimationKey))
|
||||||
return;
|
return;
|
||||||
@@ -44,9 +50,11 @@ public sealed class OrbitVisualsSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnComponentRemove(EntityUid uid, OrbitVisualsComponent component, ComponentRemove args)
|
private void OnComponentRemove(EntityUid uid, OrbitVisualsComponent component, ComponentRemove args)
|
||||||
{
|
{
|
||||||
if (!TryComp<ISpriteComponent>(uid, out var sprite))
|
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
sprite.EnableDirectionOverride = false;
|
||||||
|
|
||||||
var animationPlayer = EntityManager.EnsureComponent<AnimationPlayerComponent>(uid);
|
var animationPlayer = EntityManager.EnsureComponent<AnimationPlayerComponent>(uid);
|
||||||
if (animationPlayer.HasRunningAnimation(_orbitAnimationKey))
|
if (animationPlayer.HasRunningAnimation(_orbitAnimationKey))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
- type: Ghost
|
- type: Ghost
|
||||||
- type: GhostRadio
|
- type: GhostRadio
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
overrideContainerOcclusion: true # Ghosts always show up regardless of where they're contained.
|
||||||
netsync: false
|
netsync: false
|
||||||
noRot: true
|
noRot: true
|
||||||
drawdepth: Ghosts
|
drawdepth: Ghosts
|
||||||
|
|||||||
Reference in New Issue
Block a user