Update for collision events by-ref (#10933)
This commit is contained in:
@@ -8,7 +8,9 @@ using Robust.Server.GameStates;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
|
||||
namespace Content.Server.Singularity.EntitySystems
|
||||
{
|
||||
@@ -44,9 +46,9 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
_pvs.AddGlobalOverride(uid);
|
||||
}
|
||||
|
||||
protected override bool PreventCollide(EntityUid uid, SharedSingularityComponent component, PreventCollideEvent args)
|
||||
protected override bool PreventCollide(EntityUid uid, SharedSingularityComponent component, ref PreventCollideEvent args)
|
||||
{
|
||||
if (base.PreventCollide(uid, component, args)) return true;
|
||||
if (base.PreventCollide(uid, component, ref args)) return true;
|
||||
|
||||
var otherUid = args.BodyB.Owner;
|
||||
|
||||
@@ -54,12 +56,12 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
|
||||
// If it's not cancelled then we'll cancel if we can't immediately destroy it on collision
|
||||
if (!CanDestroy(component, otherUid))
|
||||
args.Cancel();
|
||||
args.Cancelled = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnCollide(EntityUid uid, ServerSingularityComponent component, StartCollideEvent args)
|
||||
private void OnCollide(EntityUid uid, ServerSingularityComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (args.OurFixture.ID != "DeleteCircle") return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user