Skip to content

Commit

Permalink
Also recalculate when our eye moves
Browse files Browse the repository at this point in the history
  • Loading branch information
wixoaGit committed Jan 28, 2025
1 parent b5cd119 commit 0991fe7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions OpenDreamClient/Rendering/DMISpriteSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using OpenDreamShared.Rendering;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.GameStates;
using Robust.Shared.Timing;

Expand All @@ -9,10 +10,11 @@ namespace OpenDreamClient.Rendering;
public sealed class DMISpriteSystem : EntitySystem {
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
[Dependency] private readonly ClientAppearanceSystem _appearanceSystem = default!;
[Dependency] private readonly IOverlayManager _overlayManager = default!;
[Dependency] private readonly IClyde _clyde = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly EntityLookupSystem _lookupSystem = default!;
[Dependency] private readonly TransformSystem _transformSystem = default!;
[Dependency] private readonly MapSystem _mapSystem = default!;
[Dependency] private readonly ClientScreenOverlaySystem _screenOverlaySystem = default!;
Expand Down Expand Up @@ -68,8 +70,8 @@ private void HandleTransformMove(EntityUid uid, TransformComponent component, re
if (!_spriteQuery.TryGetComponent(uid, out var sprite))
return;

if (sprite.Icon.Appearance?.Opacity is true)
_mapOverlay.DirtyTileVisibility(); // A movable with opacity=TRUE has moved
if (sprite.Icon.Appearance?.Opacity is true || uid == _playerManager.LocalSession?.AttachedEntity)
_mapOverlay.DirtyTileVisibility(); // A movable with opacity=TRUE, or our eye, has moved
}

private void HandleTileChanged(ref TileChangedEvent ev) {
Expand Down

0 comments on commit 0991fe7

Please sign in to comment.