Update for collision events by-ref (#10933)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Projectiles
|
||||
@@ -14,12 +15,11 @@ namespace Content.Shared.Projectiles
|
||||
SubscribeLocalEvent<SharedProjectileComponent, PreventCollideEvent>(PreventCollision);
|
||||
}
|
||||
|
||||
private void PreventCollision(EntityUid uid, SharedProjectileComponent component, PreventCollideEvent args)
|
||||
private void PreventCollision(EntityUid uid, SharedProjectileComponent component, ref PreventCollideEvent args)
|
||||
{
|
||||
if (component.IgnoreShooter && args.BodyB.Owner == component.Shooter)
|
||||
{
|
||||
args.Cancel();
|
||||
return;
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user