Remove ICollideSpecial
Handled in an ECS way by PreventCollideEvent. The disposals one doesn't work anyway and would've required a larger refactor of disposals to fix so out of scope.
This commit is contained in:
24
Content.Shared/GameObjects/EntitySystems/ProjectileSystem.cs
Normal file
24
Content.Shared/GameObjects/EntitySystems/ProjectileSystem.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Content.Shared.GameObjects.Components.Projectiles;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
|
||||
namespace Content.Shared.GameObjects.EntitySystems
|
||||
{
|
||||
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.Uid == component.Shooter)
|
||||
{
|
||||
args.Cancel();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user