mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
25 lines
713 B
C#
25 lines
713 B
C#
using Robust.Shared.Physics.Dynamics;
|
|
|
|
namespace Content.Shared.Projectiles
|
|
{
|
|
public abstract class SharedProjectileSystem : EntitySystem
|
|
{
|
|
public const string ProjectileFixture = "projectile";
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|