prevent pulse throw from throwing observers (#19704)
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
using Content.Server.Maps;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
|
||||
using Content.Shared.Ghost;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
|
||||
@@ -41,8 +44,13 @@ public sealed class ThrowArtifactSystem : EntitySystem
|
||||
}
|
||||
|
||||
var lookup = _lookup.GetEntitiesInRange(uid, component.Range, LookupFlags.Dynamic | LookupFlags.Sundries);
|
||||
var physQuery = GetEntityQuery<PhysicsComponent>();
|
||||
foreach (var ent in lookup)
|
||||
{
|
||||
if (physQuery.TryGetComponent(ent, out var phys)
|
||||
&& (phys.CollisionMask & (int) CollisionGroup.GhostImpassable) != 0)
|
||||
continue;
|
||||
|
||||
var tempXform = Transform(ent);
|
||||
|
||||
var foo = tempXform.MapPosition.Position - xform.MapPosition.Position;
|
||||
|
||||
Reference in New Issue
Block a user