Make the context and verb menus visible through walls for ghosts (#2415)

This commit is contained in:
DrSmugleaf
2020-10-30 04:52:37 +01:00
committed by GitHub
parent 097bde6ded
commit c86c378198

View File

@@ -5,6 +5,7 @@ using System.Linq;
using Content.Shared.Physics;
using Content.Shared.Utility;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Eye;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
@@ -46,7 +47,11 @@ namespace Content.Shared.GameObjects.Verbs
!occluder.Enabled;
}
var result = player.InRangeUnobstructed(targetPos, distance, CollisionGroup.Opaque, Ignored);
var mask = player.TryGetComponent(out SharedEyeComponent? eye) && eye.DrawFov
? CollisionGroup.Opaque
: CollisionGroup.None;
var result = player.InRangeUnobstructed(targetPos, distance, mask, Ignored);
if (!result)
{