Update for collision events by-ref (#10933)
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Movement.Events;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared.Buckle
|
||||
@@ -105,13 +106,13 @@ namespace Content.Shared.Buckle
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void PreventCollision(EntityUid uid, SharedBuckleComponent component, PreventCollideEvent args)
|
||||
private void PreventCollision(EntityUid uid, SharedBuckleComponent component, ref PreventCollideEvent args)
|
||||
{
|
||||
if (args.BodyB.Owner != component.LastEntityBuckledTo) return;
|
||||
|
||||
if (component.Buckled || component.DontCollide)
|
||||
{
|
||||
args.Cancel();
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user