23 lines
642 B
C#
23 lines
642 B
C#
using Robust.Shared.Physics.Dynamics;
|
|
|
|
namespace Content.Shared.Projectiles
|
|
{
|
|
public sealed class ProjectileSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<SharedProjectileComponent, PreventCollideEvent>(PreventCollision);
|
|
}
|
|
|
|
private void PreventCollision(EntityUid uid, SharedProjectileComponent component, PreventCollideEvent args)
|
|
{
|
|
if (component.IgnoreShooter && args.BodyB.Owner == component.Shooter)
|
|
{
|
|
args.Cancel();
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|