diff --git a/Content.Client/Popups/PopupOverlay.cs b/Content.Client/Popups/PopupOverlay.cs index e1757fb46c..85485ada56 100644 --- a/Content.Client/Popups/PopupOverlay.cs +++ b/Content.Client/Popups/PopupOverlay.cs @@ -4,6 +4,7 @@ using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Popups; using Robust.Client.Graphics; +using Robust.Client.Player; using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Shared; @@ -21,6 +22,7 @@ public sealed class PopupOverlay : Overlay { private readonly IConfigurationManager _configManager; private readonly IEntityManager _entManager; + private readonly IPlayerManager _playerMgr; private readonly IUserInterfaceManager _uiManager; private readonly PopupSystem _popup; @@ -34,6 +36,7 @@ public sealed class PopupOverlay : Overlay public PopupOverlay( IConfigurationManager configManager, IEntityManager entManager, + IPlayerManager playerMgr, IPrototypeManager protoManager, IResourceCache cache, IUserInterfaceManager uiManager, @@ -41,6 +44,7 @@ public sealed class PopupOverlay : Overlay { _configManager = configManager; _entManager = entManager; + _playerMgr = playerMgr; _uiManager = uiManager; _popup = popup; @@ -75,6 +79,7 @@ public sealed class PopupOverlay : Overlay var matrix = args.ViewportControl!.GetWorldToScreenMatrix(); var viewPos = new MapCoordinates(args.WorldAABB.Center, args.MapId); + var ourEntity = _playerMgr.LocalPlayer?.ControlledEntity; foreach (var popup in _popup.WorldLabels) { @@ -87,7 +92,7 @@ public sealed class PopupOverlay : Overlay // Should handle fade here too wyci. if (!args.WorldAABB.Contains(mapPos.Position) || !ExamineSystemShared.InRangeUnOccluded(viewPos, mapPos, distance, - e => e == popup.InitialPos.EntityId, entMan: _entManager)) + e => e == popup.InitialPos.EntityId || e == ourEntity, entMan: _entManager)) continue; var pos = matrix.Transform(mapPos.Position); diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs index a8a060d6f0..14e456177d 100644 --- a/Content.Client/Popups/PopupSystem.cs +++ b/Content.Client/Popups/PopupSystem.cs @@ -39,7 +39,7 @@ namespace Content.Client.Popups SubscribeNetworkEvent(OnPopupEntityEvent); SubscribeNetworkEvent(OnRoundRestart); _overlay - .AddOverlay(new PopupOverlay(_configManager, EntityManager, _prototype, _resource, _uiManager, this)); + .AddOverlay(new PopupOverlay(_configManager, EntityManager, _playerManager, _prototype, _resource, _uiManager, this)); } public override void Shutdown()